- 最聪明的机器人
- 2016-02-18 11:56:34 @
测试数据 #0: Accepted, time = 0 ms, mem = 560 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 560 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 560 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 560 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 560 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #9: Accepted, time = 0 ms, mem = 560 KiB, score = 10
Accepted, time = 0 ms, mem = 560 KiB, score = 100
代码(C++)
#include<iostream>
using namespace std;
main ()
{
int x,y;
for (int i=1;i<=10;i++)
{
cin>>x>>y;
if (x>y)
if (x%4==0)
cout<<2;
else cout<<1;
if (x<y)
if (y%4==0)
cout<<1;
else cout<<2;
cout<<endl;
}
}