1️⃣ A+B - 5

A, B = map(int, input().split())
result = []

while(A!=0 or B!=0):
	result.append(A+B)
	A, B = map(int, input().split())

for i in range(len(result)):
	print(result[i])
A, B = map(int, input().split())

while(A!=0 or B!=0):
	print(A + B)
	A, B = map(int, input().split())

2️⃣ A+B - 4

while True:
	try:
		A, B = map(int, input().split())
		print(A + B)
	except EOFError:
		break

https://pchild.tistory.com/2

https://www.geeksforgeeks.org/handling-eoferror-exception-in-python/

예외처리 : https://wikidocs.net/30

3️⃣ 더하기 사이클

N = input()
num = int(N); sum = 0; cnt = 0

while True:
	sum = (num % 10) + (num // 10)      # (1)
	num = (num % 10 * 10) + (sum % 10)  # (2)
	cnt += 1
	if num == int(N):    # (3)
		break

print(cnt)

https://www.geeksforgeeks.org/division-operator-in-python/