언어, 알고리즘 공부/백준2020. 2. 11. 22:43[백준 알고리즘] 1110번 더하기 사이클(Python3, Java)
n = nn = int(input()) cycle = 0 while True: res = (n // 10) + (n % 10) cycle += 1 n = int(str(n % 10) + str(res % 10)) if nn == n: break print(cycle) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); i..