POJ 2027 No Brainer
- 时间限制:
- 1000ms
- 内存限制:
- 65536kB
- 描述
- Zombies love to eat brains. Yum.
- 输入
- 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. - 输出
- 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".
- 样例输入
-
34 53 34 3
- 样例输出
-
NO BRAINSMMM BRAINSMMM BRAINS
(1)、源代码:
#include <iostream>
using namespace std;
int main(){
int n, a, b;
cin >> n;
while(n-- > 0){
cin >> a >> b;
cout << (a<b?"NO BRAINS\n":"MMM BRAINS\n");
}
return 0;
}
(2)、解题思路:略
(3)、可能出错:略