OpenJudge/Poj 2027 No Brainer
2014-03-06 14:51
429 查看
1.链接地址:
http://bailian.openjudge.cn/practice/2027 http://poj.org/problem?id=2027
2.题目:
3.思路:
4.代码:
http://bailian.openjudge.cn/practice/2027 http://poj.org/problem?id=2027
2.题目:
总Time Limit:1000msMemory Limit:65536kBDescriptionZombies love to eat brains. Yum.InputThe 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. OutputFor 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
SourceSouth Central USA 2004
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. OutputFor 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
SourceSouth Central USA 2004
3.思路:
4.代码:
#include<iostream> using namespace std; int main() { int n; cin>>n; int a,b; int i; for(i=0;i<n;i++) { cin>>a>>b; if(a>=b) cout<<"MMM BRAINS"<<endl; else cout<<"NO BRAINS"<<endl; } //system("pause"); return 0; }
相关文章推荐
- OpenJudge/Poj 2027 No Brainer
- OpenJudge/Poj 1163 The Triangle
- OpenJudge / Poj 2141 Message Decowding
- Poj OpenJudge 百练 2389 Bull Math
- OpenJudge/Poj 1458 Common Subsequence
- POJ 2027 No Brainer(我的水题之路——。。。)
- POJ(7834)-----分成互质组(openjudge)
- Poj OpenJudge 百练 Bailian 1008 Maya Calendar
- Poj OpenJudge 百练 2602 Superlong sums
- OpenJudge / Poj 1565 Skew Binary C++
- OpenJudge/Poj 1316 Self Numbers
- OpenJudge/Poj 2105 IP Address
- Poj 2159 / OpenJudge 2159 Ancient Cipher
- Poj OpenJudge 1068 Parencodings
- OpenJudge / Poj 1044 Date bugs C++
- OpenJudge / Poj 1003 Hangover
- OpenJudge.poj CR2(Enclosure-ceil向上取整)
- OpenJudge/Poj 1004 Financial Management
- Openjudge/Poj 1183 反正切函数的应用
- OpenJudge/Poj 1207 The 3n + 1 problem