Skip to content

Commit

Permalink
solve : 1357 뒤집힌 덧셈
Browse files Browse the repository at this point in the history
  • Loading branch information
wwan13 committed Apr 27, 2024
1 parent c1405b0 commit 35b12a5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions python/boj_1357.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sys

input = sys.stdin.readline


def calculate_rev_x(value):
return int("".join(list(reversed(str(value).rstrip()))))


def solution(data):
rev_x = calculate_rev_x(data[0])
rev_y = calculate_rev_x(data[1])

answer = calculate_rev_x(rev_x + rev_y)
return answer


def display_result(answer):
print(answer)


def main():
data = list(map(int, input().split()))
answer = solution(data)
display_result(answer)


main()

0 comments on commit 35b12a5

Please sign in to comment.