Mock CCC '26 J1 - Changes

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 512M

Author:
Problem type
Mock Canadian Computing Competition: 2026 Junior #1

Everything is going fine. Then suddenly, the world starts spinning. Everyone is confused about their surroundings as a whirlwind of colours flood their vision. Then, just as suddenly as it came, the spinning stops, and everything goes back to how it originally was. Originally, AndyMan68 didn't think anything of it. It was just a migraine, and he's not unfamiliar to those. But AndyMan68 has an inkling that something is wrong. Something is terribly wrong, but he just can't put his finger on the issue.

A few months pass. As AndyMan68 reaches the end of the semester, he was concerned about his math grade. After all, a 73.32 wasn't the best look on his report card, but there wasn't much he could do except to ask his math teacher to round him up. To his surprise, his math teacher told him that his final grade was 74. Confused, AndyMan68 thanks his teacher for rounding him up. But his teacher looked at AndyMan68 quizzically, informing him that 73.32 has always rounded up to 74. Puzzled, AndyMan68 tells his other friends about this strange occurrence, where his friends also told him that his mark rounds up to 74. In fact, even 73.3 rounds up to 74!

This was the change that occurred. Now, any number with a decimal part greater than or equal to 0.3 will round up, and anything below that will round down. For example, 73.32 rounds up to 74 but 73.22 rounds down to 73.

With these new changes to rounding in place, AndyMan68 requests you to help him write a program to help him round numbers!

Input Specification

The first and only line of input contains a number 0 \le N \le 10^6.

Output Specification

In one line, output the number rounded to the nearest INTEGER.

Sample Input 1

73.32

Output for Sample Input 1

74

Explanation of Output for Sample Input 1

0.32 is greater than 0.3, so it rounds up.

Sample Input 2

73.22

Output for Sample Input 2

73

Explanation of Output for Sample Input 2

0.22 is less than 0.3, so it rounds down.


Comments

There are no comments at the moment.