100I.md (828B)
1 Source: https://codeforces.com/problemset/problem/100/I 2 3 I. Rotation 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 64 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 Ehsan loves geometry! Especially he likes to rotate points! 22 23 Given a point in the plane, Ehsan likes to rotate it by *k* degrees (counter-clockwise), around the origin. What is the result of this rotation? 24 25 Input 26 27 A single integer *k* (0 ≤ *k* < 360) is given in the first line. Two integer numbers *x* and *y* are given in the second line ( - 1390 ≤ *x*, *y* ≤ 1390). 28 29 Output 30 31 Write two numbers. The result of the rotation. Your answer must have a relative error less than 10- 1. 32 33 Examples 34 35 Input 36 37 ``` 38 90 39 1 1 40 ``` 41 42 Output 43 44 ``` 45 -1.00000000 1.00000000 46 ``` 47 48 Input 49 50 ``` 51 180 52 1 1390 53 ``` 54 55 Output 56 57 ``` 58 -1.00000000 -1390.00000000 59 ```