ENIGMA-0x01 (2023) - J1 (Games with the temperature)

View as PDF

Submit solution

Points: 15 (partial)
Time limit: 1.0s
Memory limit: 16M

Authors:
Problem types
Allowed languages
Blockly, C, C++, Java, JS, Pascal, Python
Games with the temperature

Toto has traveled to the United States to see his uncle. At his uncle's house, he is surprised to find that the thermostat reads 80 degrees(!)

His uncle explains to him that in some countries they measure the temperature with a different system than the one he is used to in Greece. Specifically, in the United States, they use degrees Fahrenheit instead of degrees Celsius.

In order to convert Celsius to Fahrenheit, one has to:

  • multiply by 9
  • divide by 5
  • add 32

Totos then plays a game where he calculates the boiling or freezing point of water in degrees Fahrenheit, but quickly realises that he could write a program that does this conversion (from Celsius to Fahrenheit) automatically. His only problem is that his coding skills have turned a little rusty and so he asks for your help.

We want to write a program that will read from the STDIN input a positive integer N, the temperature in degrees Celsius.

The program will print to the output STDOUT a positive integer M, the corresponding temperature in degrees Fahrenheit.

Attention! Each line of input or output should terminate with the line change character '\n'.

Examples
1st

STDIN

25

STDOUT

77
2nd

STDIN

100

STDOUT

212

Comments

There are no comments at the moment.