a = input()
b = input()
str_v = ''
for i in range(8):
str_v+=a[i]+b[i]
new_str_v = ''
while True:
for i in range(len(str_v)-1):
x = int(str_v[i]) + int(str_v[i+1])
new_str_v += str(x%10)
str_v = new_str_v
if len(str_v) == 2:
break
else:
new_str_v = ''
print(new_str_v)
'알고리즘 문제풀이' 카테고리의 다른 글
백준 3273 두수의 합 Python 투포인트 실버3 (1) | 2024.03.05 |
---|---|
백준 1251 단어나누기 Python 문자열 브루트포스 정렬 실버5 (0) | 2024.03.05 |
백준 4344. 평균은 넘겠지 Python 수학 사칙연산 브론즈1 (0) | 2024.03.05 |
백준 10988팰린드롬인지 확인하기 Python 구현 문자열 브론즈3 (0) | 2024.03.05 |
백준 1789 수들의 합 Python 수학 그리디 실버5 (2) | 2024.03.04 |