-
1110 문자열+while코테 대비 python/백준 2023. 1. 30. 21:43
https://www.acmicpc.net/problem/1110
cnt=0 T = int(input()) N = T while True: cnt+=1 if N < 10: N = N*10+N else: N = str(N) tmp = int(N[-1])+int(N[0]) tmp = str(tmp) N = int(N[-1])*10+int(tmp[-1]) if N==T: print(cnt) break
'코테 대비 python > 백준' 카테고리의 다른 글
10809 공식을 유도하지말고 외우자 (1) 2023.01.31 11654 아스키코드 (0) 2023.01.31 10951 try except 런타임에러 나오면 생각해보기 (0) 2023.01.30 10952 while 문! (0) 2023.01.30 10952 while 문! (0) 2023.01.30