fork download
  1. #include <cmath>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5.  
  6. int main()
  7. {
  8. const double pi = std::acos(-1);
  9. int t, r, x;
  10. scanf("%d", &t);
  11. while (t--) {
  12. scanf("%d%d", &r, &x);
  13. double a = pi * x / 180;
  14. printf("%.7lf\n", r*sin(a)/(sin(a)*sin(a)+cos(a)));
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
Standard output is empty