[파이썬/python] 백준 4562번 : No Brainer (🥉3)

https://www.acmicpc.net/problem/4562

 

4562번: No Brainer

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

www.acmicpc.net

풀이

for _ in range(int(input())):
    x,y = map(int,input().split())
    if x < y :
        print("NO BRAINS")
    else :
        print("MMM BRAINS")

단순히 x와 y를 비교하여 각각 해당하는 값을 출력하면 된다.

(철자 제대로 확인하지 않아서 어이없게 틀려 헤매는 실수를 하지 말자..)

comment