Cast to Integer

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 1.0s
Memory limit: 32M

Author:
Problem type
Allowed languages
Java

Given some real number N, multiply it by 2 and then cast it to an integer.

Input Specification

The first and only line will contain N (-1000 \leq N \leq 1000). It is guaranteed that this value will not have more than 6 decimal places.

Output Specification

One integer, the value of N*2 cast to an integer.

Sample Input 1

5.284

Sample Output 1

10

Sample Output 2

6.97

Sample Output 2

13

Sample Output 3

9.00

Sample Output 3

18

Comments

There are no comments at the moment.