CodeMaster 2024
Time limit1sMemory limit1024 MB
Given n, m, and k, print the total of Doohoon's m installs on each of k computers plus Teacher Cha's m installs on the laptop.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Songdo High School hosts CodeMaster 2024, a algorithm contest for middle and high school students, which is now in its second year.
For the offline contest, every one of the computers in the venue needs editors installed. Doohoon installed editors one at a time on each of computers, and then he gave up, having installed none on the remaining computers.
Teacher Cha Hyeong-jun stepped in to help. He installed editors one time each on a separate laptop, and then he ran a macro. The macro installed editors on every computer at once.
How many times were editors installed in total by Doohoon and Teacher Cha together? The installs done by the macro are not counted.
Input
Three integers , , and are given, separated by spaces.
Output
Print the total number of times Doohoon and Teacher Cha repeated the installs.
Constraints
- .
- .