전체 글 (233) 썸네일형 리스트형 5)곱하기 혹은 더하기 N=input() res=int(N[0]) for i in range(1, len(N)): if res==0 or int(N[i])==0: res+=int(N[i]) else: res*=int(N[i]) print(res) 4)모험가 길드 N=int(input()) a=list(map(int, input().split())) a.sort() res=0 cnt=0 for i in range(N): cnt+=1 if cnt>=a[i]: res+=1 cnt=0 print(res) 3)1이 될 때까지 N, K=map(int, input().split()) cnt=0 while True: if N==1: break if N%K==0: N//=K cnt+=1 else: N-=1 cnt+=1 print(cnt) 이전 1 2 3 4 5 6 7 ··· 78 다음