HDU-2101

问题链接:https://vjudge.net/problem/HDU-2101

问题简述:

输入A,B,判断A+B的值能否被86整除

问题分析:

计算A+B的值,再进行对86取余判断能否被86整除即可

程序说明:

只需注意用while语句判断输入是否停止防止TLE即可。

AC通过的程序如下:

#include<iostream>
using namespace std;
int main()
{
	int a,b;
	while(cin>>a>>b)
	{
		if(!((a+b)%86))
		cout<<"yes"<<endl;
		else
		cout<<"no"<<endl;
	}
} 

猜你喜欢

转载自blog.csdn.net/weixin_43983015/article/details/84863574