python-algorithm
[백준] 9946
무적김두칠
2021. 1. 25. 13:10
1
2
3
4
5
6
7
8
9
10
11
|
cnt=1
while 1:
a=input()
b=input()
if a=='END' and b=='END' :break
tmpa,tmpb=[0]*26, [0]*26
for i in a: tmpa[ord(i)-97]+=1
for i in b: tmpb[ord(i) - 97] += 1
if tmpa==tmpb: print("Case %d: same"%cnt)
else: print("Case %d: different"%cnt)
cnt+=1
|
cs |
반응형