-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path15552.py
31 lines (20 loc) · 850 Bytes
/
15552.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# [ 백준 ] 15552번: 빠른 A+B
def solution() -> None:
import sys
input = sys.stdin.readline
T: int = int(input())
for _ in range(T):
print((lambda x: x[0] + x[1])(list(map(int, input().split()))))
if __name__ == "__main__":
from io import StringIO
from unittest.mock import patch
def test_example_case(input: list[str]) -> str:
with patch("builtins.input", side_effect=input):
with patch("sys.stdout", new_callable=StringIO) as test_stdout:
solution()
return test_stdout.getvalue()
case: dict[str, list[str] | str] = {
"input": ['5', "1 1", "12 34", "5 500", "40 60", "1000 1000"],
"output": "2\n46\n505\n100\n2000\n"
}
assert case["output"] == test_example_case(input=case["input"])