A + B problem Too
Time limit:3000/1000 MS (java/others) Memory limit:32768/32768 K (java/others) total submission (s): 12745 Accepted Submission (s): 9499
Problem Description
This problem was also a + B problem,but it has a little difference,you should determine does (A+B) could being divided with 86.For example, if (a+b) =98,you should output no for result.
Input
Each line would contain integers A and B. Process to end of file.
Output
For each case, if (a+b)%86=0,output Yes in one line,else output no in one line.
Sample Input
1 1
8600 8600
Sample Output
No
Yes
Source
HDU 2007-6 Programming Contest
The main topic: Judge (a+b)%86 is equal to 0, equals 0 output "yes", otherwise output "no".
Idea: water can no longer water ...
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring>using namespace Std;int Main () { int A, b; while (Cin >> A >> B) { if ((a+b)%86) cout << "no" << Endl; else cout << "yes" << Endl; } return 0;}
HDU2101 A + B problem Too "water problem"