ATAN - Angular Relationship
Sri is travelling in the positive XY direction (I quadrant) of an infinitely long grid, with origin at (0, 0). Sri's fiancé wants to give her a surprise and decides to arrange a party at her arrival location. In order to determine where she will be arriving, her fiancé wants to know the angle Sri makes with respect to the X-axis. Given Sri's current location on the grid, help her fiancé to determine the angle she makes with the X axis.
Input
Each test case consists of two integers, X and Y (0 <= X, Y <= 100), where Sri is located right now. Assume the value of pi is 3.14.
Output
Print a line for each test case, denoting the floor value of the angle (in degrees) Sri makes with the X-axis.
Example
Input
2 2
Output
45
Explanation Sri is travelling diagonally and the angle she makes is exactly 45 degrees.
(Look at the image for a better explanation)
Example 2
Input
1 20
Output
87
Added by: | Kousik Kumar |
Date: | 2013-09-10 |
Time limit: | 0.5s |
Source limit: | 5000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM32-GCC ASM64 MAWK BC C-CLANG NCSHARP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JS-MONKEY JULIA KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET |
Resource: | Own Problem |