본문 바로가기
python-algorithm

백준 26531 Simple Sum

by 무적김두칠 2022. 12. 22.

https://www.acmicpc.net/problem/26531

 

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

 

1
2
3
4
5
6
7
8
9
10
11
def sol(s):
    left,right = s.split('=')
    if eval(left) == int(right):
        return 'YES'
    else:
        return 'NO'
 
if __name__ == '__main__':
    s = input()
    print(sol(s))
 
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 5358 Football Team  (0) 2022.12.22
백준 26332 Buying in Bulk  (0) 2022.12.22
백준 6825 Body Mass Index  (0) 2022.12.22
백준 26340 Fold the Paper Nicely  (0) 2022.12.22
백준 6887 Squares  (0) 2022.12.22

댓글