From 61ff1028f65a7c89a004ac24a9423624e830d93c Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Mon, 20 May 2024 16:21:53 +0900 Subject: [PATCH] add: swea/3750.py --- swea/3750.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 swea/3750.py diff --git a/swea/3750.py b/swea/3750.py new file mode 100644 index 0000000..7cf87a1 --- /dev/null +++ b/swea/3750.py @@ -0,0 +1,14 @@ +t=int(input()) +pr=[] +for tc in range(1,t+1): + n=input() + while len(n)>1: + r=0 + for c in n: + v=int(c) + r+=v + n=str(r) + pr.append("#{} {}".format(tc,n)) + +for p in pr: + print(p)