一个poj水题--ID 2027
2012-10-09 18:57
369 查看
Problem:
Input
The first line contains a single integer n indicating the number of data sets.
The following n lines each represent a data set. Each data set will be formatted according to the following description:
A single data set consists of a line "X Y", where X is the number of brains the zombie eats and Y is the number of brains the zombie requires to stay alive.
Output
For each data set, there will be exactly one line of output. This line will be "MMM BRAINS" if the number of brains the zombie eats is greater than or equal to the number of brains the zombie requires to stay alive. Otherwise, the line will be "NO BRAINS".
Sample Input
Sample Output
因为基础是在是很差,所以学习进度超慢,很木有信心啊。。。所以找来水题做一下,找点自信,嘿嘿,见笑,见笑~~
Input
The first line contains a single integer n indicating the number of data sets.
The following n lines each represent a data set. Each data set will be formatted according to the following description:
A single data set consists of a line "X Y", where X is the number of brains the zombie eats and Y is the number of brains the zombie requires to stay alive.
Output
For each data set, there will be exactly one line of output. This line will be "MMM BRAINS" if the number of brains the zombie eats is greater than or equal to the number of brains the zombie requires to stay alive. Otherwise, the line will be "NO BRAINS".
Sample Input
3 4 5 3 3 4 3
Sample Output
NO BRAINS MMM BRAINS MMM BRAINS My Answer(一次通过哦,只是寻找一下安慰,嘿嘿)
#include <iostream> using namespace std; int main() { int i,num1,num2; cin>>i; while(i>0) { cin>>num1>>num2; if(num1>=num2) cout<<"MMM BRAINS"<<endl; else cout<<"NO BRAINS"<<endl; i--; } return 0; }
因为基础是在是很差,所以学习进度超慢,很木有信心啊。。。所以找来水题做一下,找点自信,嘿嘿,见笑,见笑~~
相关文章推荐
- POJ,北大OJ2027,No Brainers难得的水题。。
- POJ 2591 Set Definition(我的水题之路——又一个丑数)
- POJ 2027 No Brainer(我的水题之路——。。。)
- POJ 2027(水题)
- No Brainer - POJ 2027 水题
- http://poj.org/problem?id=3628 背包问题还有一个地方没想明白 直接DFS()
- POJ 2485Highways (又一个Prim最小生成树水题)
- poj水题--ID3299
- POJ 3518 Prime Gap 筛法+二分 水题一个
- poj 2034(dfs。。。居然别一个水题卡住了)
- POJ-2027 No Brainer 水题
- poj水题--ID3062
- POJ 1504 (一个水题引发的血案)
- poj水题--ID3030
- http://poj.org/problem?id=2488
- poj1032~沉寂后回归的第一道水题
- 编写一个程序,开启3个线程,这3个线程的ID分别为A、B、C,每个线程将自己的ID在屏幕上打印10遍,要求输出结果必须按ABC的顺序显示;如:ABCABC….依次递推。
- (多项式特性4.7.7)POJ 2126 Factoring a Polynomial(判断一个多项式能否被分解)
- 兼容 IE和FireFox的 XML_HTTP和浏览器共享同一个SessionID
- poj 2406 KMP算法中next的一个性质