LCC '24 Contest 1 J1 - Counting Money

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Bob (the penguin 🐧) wants to purchase halloween treats and decorations! However, he realizes that he only has A quarters (25 cents) and B dimes (10 cents) and no other coins. Since math isn't his strong suit, please help him find the number of cents he has to plan his halloween spending.

Input Specification

The input will contain two space-separated integers A, B, representing the number of quarters and dimes, respectively.

Output Specification

Output one integer, representing the number of cents he has in total. Note that you may need to use long in Java or long long in C++.

Subtasks

Subtask 1 [25%]

0 \le A, B \le 10^3

Subtask 2 [75%]

0 \le A, B \le 10^8

Sample Input 1

2 3

Sample Output 1

80

Sample Input 2

100000000 100000000

Sample Output 2

3500000000

Sample Explanation 2

Note that the answer (3.5 \times 10^9) exceeds the standard integer limit.


Comments

There are no comments at the moment.