SAC '22 Code Challenge 5 Junior P1 - Monkey, Type!

View as PDF

Submit solution


Points: 3
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Max has recently discovered a new typing test website called LeetCode.

On this website, he is prompted to type as many words as possible in a given text.

He knows that he can type X words in T seconds, but he still would have 60 - T seconds left and wants to achieve a WPM (words per minute) of W.

Since Max is too busy typing, he cannot solve this problem, so he blackmails kindly requests you to help him.

Can you determine how many more words he must type to achieve W WPM?

Constraints

1 \le X \le 177

1 \le T \le 59

X \le W \le 180

Input Specification

The first line will contain an integer, X, the number of words he can type in that time.

The second line will contain an integer, T, the number of seconds it takes him to type X words.

The third line will contain an integer, W, the WPM he wants to achieve.

Output Specification

Output how many more words he must type to achieve W WPM.

Sample Input

120
45
165

Sample Output

45

Comments

There are no comments at the moment.