UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#185619#1189. 奇偶性luojianwei2216251001ms1200kbC++193b2023-09-30 09:24:042023-09-30 09:24:05

answer

#include <iostream>
using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	if(a % 2 == 0 && b % 2 == 0 || a % 2 != 0 && b % 2 != 0) cout << 1;
	else cout << a + b;
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 25
Accepted
time: 0ms
memory: 1200kb

input:

3 7

output:

1

result:

ok single line: '1'

Test #2:

score: 25
Accepted
time: 1ms
memory: 1200kb

input:

7 8

output:

15

result:

ok single line: '15'

Test #3:

score: 25
Accepted
time: 0ms
memory: 1196kb

input:

4 6

output:

1

result:

ok single line: '1'

Test #4:

score: 25
Accepted
time: 0ms
memory: 1200kb

input:

12 23

output:

35

result:

ok single line: '35'