您的位置:首页 > 其它

hdu2101 A + B Problem Too

2014-07-28 21:23 148 查看

A + B Problem Too

Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)

Total Submission(s): 11484 Accepted Submission(s): 8576



[align=left]Problem Description[/align]
This problem is also a A + B problem,but it has a little difference,you should determine does (a+b) could be divided with 86.For example ,if (A+B)=98,you should output no for result.

[align=left]Input[/align]
Each line will contain two integers A and B. Process to end of file.

[align=left]Output[/align]
For each case, if(A+B)%86=0,output yes in one line,else output no in one line.

[align=left]Sample Input[/align]

1 1
8600 8600


[align=left]Sample Output[/align]

no
yes[code]#include<stdio.h>
int main()
{
int a,b;
while(~scanf("%d%d",&a,&b)&&a+b!=98)
{
if((a+b)%86==0)
printf("yes\n");
else printf("no\n");
}
return 0;
}

[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: