## DMOPC '15 Contest 6 P2 - Tilt

View as PDF

Points: 6 (partial)
Time limit: 1.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

cheesecake is preparing to write some math tests. Since math does not come easily to cheesecake, he is also preparing for the worst: not getting perfect on each one. Whenever cheesecake botches a test, the experience emotionally tilts him — it throws him off his game. He has to write tests, knowing that test will tilt him by degrees (naturally, tilt is mathematically represented in degrees).

Remembering the wise words of his math teacher, cheesecake recalls that once you tilt a full 360 degrees, you are back to normal — that is, a tilt of is equal to no (zero) tilt.

cheesecake would like to know just how disappointed he will feel after writing all his tests. To this end, he has asked you to determine his final tilt.

#### Input Specification

The first line of input will contain the integer , the number of math tests cheesecake will write.
The next lines of input will each contain the decimal tilt of a test, with line representing .

#### Output Specification

A single decimal value in the range ; cheesecake's tilt after writing all his tests. Answers will be considered correct if they are within an absolute or relative error less than or equal to .

#### Sample Input

2
0.00000
361.00000

#### Sample Output

1.00000

#### Explanation

cheesecake was well prepared for his first test, but his second test had some tricky logarithms that tilted him by . This is equivalent to a tilt of .

• commented on May 20, 2019, 4:26 p.m.

Tilted myself 6 points.

• commented on July 25, 2016, 10:22 p.m.

Using Turing tilts me by 399 gradians

• commented on July 26, 2016, 10:31 p.m.

I'm tilted 0 degrees.

• commented on July 27, 2016, 7:10 p.m. edited