Plabon_dutta

Calm Down Light Oj

Feb 5th, 2021 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. #include<math.h>
  4. #define pi acos(-1)
  5.  
  6. int main() {
  7. int t, c=1;
  8. double R, r, z, n;
  9. scanf("%d", &t);
  10. while(t--) {
  11. scanf("%lf %lf", &R, &n);
  12. z=sin(pi/n);
  13. r=(R*z)/(1+z);
  14. printf("Case %d: %lf\n", c++, r);
  15. }
  16. return 0;
  17. }
  18.  
Add Comment
Please, Sign In to add comment