QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#757739#9629. 小 C 的神秘图形wangji1Compile Error//C++17250b2024-11-17 13:02:552024-11-17 13:02:56

Judging History

你现在查看的是最新测评结果

  • [2024-11-17 13:02:56]
  • 评测
  • [2024-11-17 13:02:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin >> n;
	string a, b;
	cin >> a >> b;
	for (int i = 0; i < n; i++) if(a[i] == '1' or b[i] == '1') {
		
	} else {
		cout << 0 << '\n';
		return;
	}
	cout << 1 << '\n';
}

详细

answer.code: In function ‘int main()’:
answer.code:12:17: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
   12 |                 return;
      |                 ^~~~~~