본문 바로가기
python-algorithm

[백준] 13420

by 무적김두칠 2021. 1. 14.

1
2
3
4
for _ in range(int(input())):
    a,b=input().split('=')
    if eval(a)== int(b) :print('correct')
    elseprint('wrong answer')
cs

python 내장함수 eval 쓰시면 쉽게 풀 수 있습니다 ㅎㅎ

반응형

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

[백준] 14219  (0) 2021.01.14
[백준] 13458  (0) 2021.01.14
[백준] 13419  (0) 2021.01.14
[백준] 13410  (0) 2021.01.14
[백준] 13304  (0) 2021.01.14

댓글