add: boj/1769.py
This commit is contained in:
17
boj/1769.py
Normal file
17
boj/1769.py
Normal file
@@ -0,0 +1,17 @@
|
||||
n=input()
|
||||
count=0
|
||||
r=int(n)
|
||||
|
||||
while len(n)>1:
|
||||
r=0
|
||||
for i in n:
|
||||
v=int(i)
|
||||
r+=v
|
||||
n=str(r)
|
||||
count+=1
|
||||
|
||||
print(count)
|
||||
if r%3==0:
|
||||
print("YES")
|
||||
else:
|
||||
print("NO")
|
||||
Reference in New Issue
Block a user