Created
April 15, 2016 11:03
-
-
Save phongngtuan/a9eddbc279c7380f0edd00e1e63bf848 to your computer and use it in GitHub Desktop.
1799_Yeehaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <tgmath.h> | |
| using namespace std; | |
| #define PI 3.14159265 | |
| int main() | |
| { | |
| int N; | |
| cin >> N; | |
| double R, r; | |
| int n; | |
| cout.precision(3); | |
| for (int i=0; i<N; i++) | |
| { | |
| cin >> R >> n; | |
| cout << fixed << R/(1 + 1/sin(PI/n)); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment