python-algorithm
[백준] 1871
무적김두칠
2021. 1. 6. 17:55
1
2
3
4
5
6
7
|
import sys
for _ in range(int(sys.stdin.readline())):
l,d=sys.stdin.readline().split('-')
cnt= (ord (l[0])-65)*(26**2) + (ord(l[1])-65)*26+ord (l[2])-65
d= int(d)
if abs(cnt-d)>100: print("not nice")
else: print("nice")
|
cs |
반응형