PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SCKTCUOIKI0005. Máy tính với bốn lựa chọn (Four-Operation Calculator)
Bài tập này chưa được xếp vào lộ trình.
Mục lục đề ⌄
Đang đọc
Máy tính với bốn lựa chọn (Four-Operation Calculator)
Four-Operation Calculator
**Version: Phuoc Hung OJ Extended
Problem Statement
A calculator takes two nonnegative integers , and an operation code . Code means , code means , code means , and code means the integer quotient of divided by (discarding the remainder). Other codes are invalid. The input guarantees .
Input
The first line contains integer .
The second line contains integer .
The third line contains integer .
Output
If is valid, print exactly one integer representing the selected operation; for code , print only the integer quotient. Otherwise print exactly Không hợp lệ.
Subtasks
- Subtask 1 (20 points): ; ; .
- Subtask 2 (30 points): ; ; .
- Subtask 3 (50 points): ; ; .
Examples
Input
23
5
4
Output
4
Explanation
The values are , , . Operation requests the integer quotient. Since , the quotient is , which is printed.