1
2
3
4
5
6
7
8
9
|
hh=0 ;mm=0 ;ss=0
cnt=0
n,k=map(int, input().split())
while 1:
if str(k) in str(hh).zfill(2) or str(k) in str(mm).zfill(2) or str(k) in str(ss).zfill(2):cnt+=1
if hh == n and mm == 59 and ss == 59: print(cnt);break
ss+=1
if ss==60 : mm+=1; ss-=60
if mm==60 : hh+=1; mm-=60
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
[백준] 18795 (0) | 2021.01.19 |
---|---|
[백준] 18406 (0) | 2021.01.19 |
[백준] 18245 (0) | 2021.01.19 |
[백준] 18238 (0) | 2021.01.19 |
[백준] 18228 (0) | 2021.01.19 |
댓글