| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 14974 | Temperature Madness |
|
| 14977 | Juliet and Romeo |
|
Description
Dr. Fajardo has invented a new unit for measuring temperature. To prevent any confusion between Celsius and Kelvin, he decides to invent a metric called Timble. He believes that all countries should adopt this unit and plans to propose it at the next UN conference.
Timble is calculated is as follows:
Given a temperature Celsius:
- Convert it to kelvin.
- Discard the decimal part of the resulting Kelvin temperature.
- Append the letter ‘A’ to the resulting integer.
Below is an example of the how Timble is calculated:
-
Temperature in Celsius = 23
-
Temperature in Kelvin = 23 + 273.15 = 296.15
-
Discard the decimal part = 296
-
Append A = 296A
-
Therefore, the temperature in Timble is 296A
Before presenting his proposal to the UN, he wants to write a program to automatically convert a temperature from Celsius to Timble.
Please help Dr. Fajardo!
Input
A float C, representing the temperature in degrees Celsius, where:
-100 ≤ C ≤ 100
Output
The corresponding temperature in Timble
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Romeo and Juliet are lovers from two feuding families. Because their relationship must remain secret, they use a secret code to communicate. Each word is made up of exactly 5 letters.
To encode a word, they use the ASCII value (https://www.ascii-code.com/) of each letter and add 1 to it. To decode a message, they subtract 1 from each number and convert the result to its corresponding ASCII character.
For example, instead of using the number 65 to refer to the ASCII character 'A', they would use the number 66 instead.
Because Romeo has difficulty decoding Juliet’s messages using the new secret code, he decides to write a program that automatically converts the numbers into the correct word.
Please help Romeo complete the program so that he can communicate with his beloved Juliet!
Input
5 integer numbers
Output
A string that represents the translated version of the code