From 81182f95552f99301291b109e36833454d19c6a0 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Thu, 9 May 2024 01:29:52 +0900 Subject: [PATCH] add: boj/1769.py --- boj/1769.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 boj/1769.py diff --git a/boj/1769.py b/boj/1769.py new file mode 100644 index 0000000..c8e7885 --- /dev/null +++ b/boj/1769.py @@ -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")