- Home
- paiza’s online hackathon Vol.6
- Tsubame Midorikawa

Your team is building an excavation game where users won rewards when the users excavate OOPArts. You are building a module to calculate the rewards.

The procedure to calculate the amounts of rewards offered of is as follows.

First, you are given random double digits "N". The amounts of rewards offered of, "R", are calculated as: R = N + (tens place of "N") + (ones place of "N")

The amount for the random digits "27" is calculated as follows:

You are given a random double digits "N". Find the amounts of reward offered of, "R".

The procedure to calculate the amounts of rewards offered of is as follows.

First, you are given random double digits "N". The amounts of rewards offered of, "R", are calculated as: R = N + (tens place of "N") + (ones place of "N")

The amount for the random digits "27" is calculated as follows:

You are given a random double digits "N". Find the amounts of reward offered of, "R".

Find the amounts of reward offered of, "R".

N

10 ≦ N ≦ 99

Add a newline character at the end of the output. Do not include any unnecessary characters or empty lines.

- Input example 1
- 27

- Output example 1
- 36

- Input example 2
- 97

- Output example 2
- 113

Please enter and submit the code that solves the problem above using the text box below.

You can use the following languages： Java, PHP, Ruby, Perl, Python, C, C#, and C++.

To find out about methods for reading values from standard input, please refer to the sample codes shown in the pages below：

- Sample code for reading in and writing out values.
- Language versions and environment information (the Time Limit will be different from this site paiza)

Select language