728x90
26531번: Simple Sum
You have hired someone to help you with inventory on the farm. Unfortunately, the new cowhand has very limited math skills, and they are having trouble summing two numbers. Write a program to determine if the cowhand is adding these numbers correctly.
www.acmicpc.net
문제 풀이
간단한 문제이다. a, b의 합이 c와 같으면 "YES", 다르면 "NO"를 출력해준다.
정답 코드
a, _, b, _, c = input().split()
if int(a) + int(b) == int(c) : print("YES")
else : print("NO")
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 26546 - Reverse [python] (0) | 2023.03.06 |
---|---|
[BOJ/백준] 26532 - Acres [python] (0) | 2023.03.06 |
[BOJ/백준] 13116 - 30번 [C++/python] (0) | 2023.03.04 |
[BOJ/백준] 7595 - Triangles [C++/python] (0) | 2023.03.03 |
[BOJ/백준] 6888 - Terms of Office [C++/python] (0) | 2023.03.02 |