Just Round Down
Time limit2sMemory limit1024 MB
Given a positive decimal number as text, print its floor, the greatest integer not exceeding it.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
The Taiwan Online Programming Contest is a prestigious event that attracts talented programmers from all over the world. It is known for challenging problems and a competitive environment, where only the best participants can prove their skills.
One problem setter has gained a notorious reputation among participants. This setter, known only by the pseudonym truckski, has an unusual fascination with numbers, especially big numbers, floating-point numbers, and any mathematical challenge that requires precise calculation. Problems by truckski often force competitors to think carefully about the properties of numbers and how they can be manipulated.
In this year's edition, truckski came up with a problem that looks simple but is tricky. It is built on a basic concept: rounding a floating-point number down to the nearest integer. The task seems straightforward, but the difficulty lies in the precision required and in handling a variety of floating-point values accurately.
Write a program that takes a positive floating-point number as input and outputs the result of rounding it down to the nearest integer. This operation is called the floor of a number. The floor is the greatest integer that is less than or equal to the number.
Input
The input is a single line containing one positive floating-point number .
Output
Print a single integer, the floor of . Do not print a decimal point.
Constraints
- The input contains several digits and exactly one decimal point.
- The last printable character of the input is a digit.
- There is at least one digit before the decimal point.
- For , there is no leading zero.
- The input file is at most 15 bytes.
Hint
The problem description is a fiction written by ChatGPT.