题目描述
#include<stdio.h>
/******************************************/
/// Write your code here,
///beginningwith"#define"…
/******************************************/
int main()
{
int a, b, s;
while(~scanf("%d%d", &a, &b))
{
s = (a + b) % MOD;
printf("%d\n", s);
}
return 0;
}
样例输入 Copy
1 2
4 7
5 9
样例输出 Copy
3
0
3
代码
#include <stdio.h>
/******************************************//// Write your code here,
///beginning with "#define"...
#define MOD 11//观察可得宏定义常量MOD为11
/******************************************/int main()
{
int a, b, s;
while(~scanf("%d%d", &a, &b))
{
s = (a + b) % MOD;
printf("%d\n", s);
}
return 0;
}