1
2
3
4
5
6
7
8
9
|
tmp=[0]*10
s=input()
for i in s: tmp[int(i)]+=1
if (sum(tmp[3:8])+tmp[9])>0: print(0)
else:
if tmp[0]>0 and tmp[1]>0 and tmp[2]>0 and tmp[8]>0 :
if tmp[0]== tmp[1] ==tmp[2]==tmp[8]: print(8)
else: print(2)
else: print(1)
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
[백준] 16944 (0) | 2021.01.18 |
---|---|
[백준] 16676 (0) | 2021.01.18 |
[백준] 16515 (0) | 2021.01.18 |
[백준] 16497 (0) | 2021.01.18 |
[백준] 16462 (0) | 2021.01.18 |
댓글