https://www.acmicpc.net/problem/31654
31654번: Adding Trouble
Your friend Bob is really bad at adding numbers, and he’d like some help to make sure he’s doing it correctly! Can you help Bob make sure he is adding correctly? Given 3 integers $A$, $B$, $C$, make sure that $A + B = C$, and that Bob indeed added $A$
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
|
def sol(a, b, c):
if a + b == c:
return "correct!"
else:
return "wrong!"
if __name__ == '__main__':
a, b, c = map(int, input().split())
print(sol(a, b, c))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 31611 火曜日 (Tuesday) (0) | 2024.04.15 |
---|---|
백준 31614 分 (Minutes) (0) | 2024.04.15 |
백준 31450 Everyone is a winner (0) | 2024.03.31 |
백준 31429 SUAPC 2023 Summer (0) | 2024.02.26 |
leetcode 3038. Maximum Number of Operations With the Same Score I (0) | 2024.02.18 |
댓글