Problem list
Log in
#r03315 · Online Judge > GoldOJ

Operator Precedence

Bronze V 2.0 s 256 MB

Given three natural numbers $A$, $B$, $C$, print $A + B \times C$ on the first line and $(A + B) \times C$ on the second.

Input

Three integers $A$, $B$, $C$ ($1 \le A, B, C \le 1000$).

Output

Print the two values, one per line.

Example 1

Input
2 3 4
Output
14
20

Example 2

Input
10 5 10
Output
60
150
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 1 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code