#B2016. Truncate Floating-Point Number to Integer

    ID: 11098 Type: Default 1000ms 256MiB

Truncate Floating-Point Number to Integer

Truncate Floating-Point Number to Integer

Given a double-precision floating point number, output its truncated integer value, i.e. round it toward zero.
Explanation: Rounding toward zero means that positive numbers are rounded down (floor) and negative numbers are rounded up (ceil). In mathematical terms, for an input \( x \), the output is \( trunc(x) \).

inputFormat

A single double-precision floating point number.

outputFormat

An integer which is the truncated value of the input (rounded toward zero).

sample

3.7
3