← Back to List

4447번: 좋은놈 나쁜놈 ↗

Solutions

Python 3
244 B | 244 chars
cnt = int(input())
for i in range(cnt):
    s=input()
    a=s.lower()
    g=a.count('g')
    b=a.count('b')
    print(s,"is",end=" ")
    if g == b:
        print("NEUTRAL")
    elif g>b:
        print("GOOD")
    else:
        print("A BADDY")