-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10998.py
34 lines (24 loc) · 832 Bytes
/
10998.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
32
33
34
# [ 백준 ] 10998번: AxB
def solution() -> None:
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[int]):
with patch("builtins.input", side_effect=input):
with patch("sys.stdout", new_callable=StringIO) as test_stdout:
solution()
return test_stdout.getvalue()
cases: list[dict[str, list[str] | int]] = [
{
"input": ["1 2"],
"output": 2
},
{
"input": ["3 4"],
"output": 12
},
]
for case in cases:
output: str = case["output"]
assert f"{output}\n" == test_example_case(input=case["input"])