시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 774 519 487 71.512%

문제

덧셈, 뺄셈, 곱셈, 나눗셈을 할 수 있는 계산기 프로그램을 만드시오.

입력

입력의 각 줄에는 숫자와 +, -, *, /, =중 하나가 교대로 주어진다. 첫 번째 줄은 수이다. 연산자의 우선 순위는 생각하지 않으며, 입력 순서대로 계산을 하고, =가 주어지면, 그때까지의 결과를 출력한다. 주어지는 수는 108 이하의 양의 정수이다. 계산 중 결과는 0 또는 음수가 될 수 있지만, -108 ~ 108 범위를 넘지는 않는다. 또, 나눗셈에서 소수점은 버린다. 따라서, 100/3*3 = 99이다.

출력

첫째 줄에 계산 결과를 출력한다.

예제 입력 1

1
+
1
=

예제 출력 1

2
W3sicHJvYmxlbV9pZCI6IjU2MTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjYzRcdWMwYjBcdWFlMzAgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4IiwiZGVzY3JpcHRpb24iOiI8cD5cdWIzNjdcdWMxNDgsIFx1YmU4NFx1YzE0OCwgXHVhY2YxXHVjMTQ4LCBcdWIwOThcdWIyMTdcdWMxNDhcdWM3NDQgXHVkNTYwIFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVhY2M0XHVjMGIwXHVhZTMwIFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWI5Y2NcdWI0ZGNcdWMyZGNcdWM2MjQuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5cdWM3ODVcdWI4MjVcdWM3NTggXHVhYzAxIFx1YzkwNFx1YzVkMFx1YjI5NCBcdWMyMmJcdWM3OTBcdWM2NDAgKywgLSwgKiwgXC8sID1cdWM5MTEgXHVkNTU4XHViMDk4XHVhYzAwIFx1YWQ1MFx1YjMwMFx1Yjg1YyBcdWM4ZmNcdWM1YjRcdWM5YzRcdWIyZTQuIFx1Y2NhYiBcdWJjODhcdWM5ZjggXHVjOTA0X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