## GlobeX Cup '18 J1 - Rounding Errors

View as PDF

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Lancrize has just been hired to be a science teacher. In order to do science stuff, he has to do some stuff with equations and round some random numbers. He will round up if the decimal point after the number is above or equal to .5. If the decimal point after the number is strictly below .5, he will round down. Output the number of times he rounds up and down.

Rounding .0 is considered rounding down.

#### Input Specification

The first line will contain a single integer , the number of times Lancrize has to round.

The next lines will contain a single floating-point number , the value of the number he is trying to round. It is guaranteed will not contain more than digits after the decimal point.

#### Output Specification

Output on the first line the number of times Lancrize rounds up, and the second line the number of time Lancrize rounds down.

No further constraints.

#### Sample Input

5
1.31
4.34
2.1
4.823
10.215

#### Sample Output

1
4

#### Explanation For Sample

Lancrize has to round up for 4.823, and rounds down for 1.31, 4.34, 2.1, 10.215.