HDU2101 A + B Problem Too【水题】

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 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.

Input

Each line will contain two 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

题目大意:判断(A+B)%86是否等于0,等于0输出"yes",否则输出"no"。

思路:水的不能再水了。。。

#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;
}
时间: 2024-10-10 05:27:52

HDU2101 A + B Problem Too【水题】的相关文章

HDU2123 An easy problem【水题】

An easy problem Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5922    Accepted Submission(s): 4122 Problem Description In this problem you need to make a multiply table of N * N ,just like th

HDU2132 An easy problem【水题】

An easy problem Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10149    Accepted Submission(s): 2689 Problem Description We once did a lot of recursional problem . I think some of them is easy

HDU 5443 The Water Problem (水题,暴力)

题意:给定 n 个数,然后有 q 个询问,问你每个区间的最大值. 析:数据很小,直接暴力即可,不会超时,也可以用RMQ算法. 代码如下: #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <set> #include <queue

HDU 5832 A water problem (水题,大数)

题意:给定一个大数,问你取模73 和 137是不是都是0. 析:没什么可说的,先用char 存储下来,再一位一位的算就好了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream>

HDU 5328(2015多校4)-Problem Killer(水题)

题目地址:HDU 5328 题意:在一个长度为n的序列中取出连续的k个数,让这k个数组成等差数列或者等比数列,问这样的k最大可以是多少. Ps:注意用double搞,因为等比数列求公比相除可能为小数. #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <iostream> #include <sstream> #i

浙大acm-1001-A + B Problem(水题)

Calculate a + b Input The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line. Output For each pair of input integers a and b you should output the sum of a and b in one line,and with one li

【UVA - 1644】Prime Gap(水题)

Prime Gap 这里直接写中文了 Descriptions: 对于一个数n,若n为素数则输出0,否则找到距离n最小的两个素数,一个大于n,一个小于n,输出他们的差(正数) Input 多组输入 每行包含一个数n 若n为0,程序结束 Output 对于每个测试数据,输出一个答案占一行 Sample Input 10 11 27 2 492170 0 Sample Output 4 0 6 0 114 题目链接: https://vjudge.net/problem/UVA-1644 水题,先求

sdut 2841 Bit Problem (水题)

题目 贴这个题是因为看题解有更简单的方法, 我做的时候是直接算的, 也很简单. 贴一下题解吧: 如果一个整数不等于 0,那么该整数的二进制表示中至少有一位是 1. 这个题结果可以直接输出 x - (x&(x-1)); 因为x-1 之后二进制下,就是最右边的1变成了0, 最右边的1的 右边所有的0变成了1, 不影响最左边. 我的代码: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4

水题 HDOJ 4716 A Computer Graphics Problem

题目传送门 1 /* 2 水题:看见x是十的倍数就简单了 3 */ 4 #include <cstdio> 5 #include <iostream> 6 #include <algorithm> 7 #include <cstring> 8 #include <string> 9 #include <cmath> 10 using namespace std; 11 12 const int MAXN = 1e4 + 10; 13

HDU 5832 A water problem(某水题)

HDU 5832 A water problem(某水题) Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)   Problem Description - 题目描述 Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is