HDU2101 A + B problem Too "water problem"

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.