From 177d1eddd05de17f22f6d20b918f4ca58eba0e7d Mon Sep 17 00:00:00 2001 From: hyesuuou <68391767+hyesuuou@users.noreply.github.com> Date: Thu, 16 Dec 2021 07:59:03 +0900 Subject: [PATCH] =?UTF-8?q?[#3]=202021.12.15=20=EB=B0=B1=EC=A4=80=EB=8B=A8?= =?UTF-8?q?=EA=B3=84=EB=B3=844.=20while=EB=AC=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Boj/while\353\254\270/10951.py" | 6 ++++++ "Boj/while\353\254\270/10952.py" | 5 +++++ "Boj/while\353\254\270/1110.py" | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 "Boj/while\353\254\270/10951.py" create mode 100644 "Boj/while\353\254\270/10952.py" create mode 100644 "Boj/while\353\254\270/1110.py" diff --git "a/Boj/while\353\254\270/10951.py" "b/Boj/while\353\254\270/10951.py" new file mode 100644 index 0000000..8a200f8 --- /dev/null +++ "b/Boj/while\353\254\270/10951.py" @@ -0,0 +1,6 @@ +while True: + try: + A, B= map(int,input().split()) + print(A+B) + except EOFError: + break \ No newline at end of file diff --git "a/Boj/while\353\254\270/10952.py" "b/Boj/while\353\254\270/10952.py" new file mode 100644 index 0000000..2d7aca0 --- /dev/null +++ "b/Boj/while\353\254\270/10952.py" @@ -0,0 +1,5 @@ +while True: + a, b = map(int, input().split()) + if a == 0 and b == 0: + break + print(a+b) diff --git "a/Boj/while\353\254\270/1110.py" "b/Boj/while\353\254\270/1110.py" new file mode 100644 index 0000000..7deb335 --- /dev/null +++ "b/Boj/while\353\254\270/1110.py" @@ -0,0 +1,18 @@ +n = input() +cycle = 0 +new = int(n) + +while True: + + # 두 자리를 합함 + sum = 0 + for i in str(new): + sum = sum + int(i) + + # 새로운 수 + new = (new%10 * 10) + sum%10 + cycle = cycle + 1 + if new == int(n): + break + +print(cycle) \ No newline at end of file