본문 바로가기
python-algorithm

[백준] 16674

by 무적김두칠 2021. 1. 18.

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])>0print(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)
        elseprint(2)
    elseprint(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

댓글