Mathematics is an integral part of programming. To perform mathematical operations programmatically, you must first learn how to use arithmetic operators.
Input
The only line of input contains two integers $ A $ and $ B $.
Output
On the first 3 lines, output the sum, difference (not absolute difference) and product of $ A $ and $ B $ respectively.
On the fourth line, output the quotient and remainder when $ A $ is divided by $ B $, separated by a space.
On the fifth and final line, output $ A^B $.
Constraints
$ 0 \le A \le 9 $
$ 1 \le B \le 9 $
Reminder
You should always check if your code functions at the extrema of the constraints.
Sample Test Cases
Input | Output | |
---|---|---|
5 3 | 8 2 15 1 2 125 |
Scoring: Per Case
Authored by s16f22