artemgf

Задача L. Улитки

Nov 19th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #define _USE_MATH_DEFINES
  3. #include <iostream>
  4. #include <conio.h>
  5. #include <string>
  6. #include <algorithm>
  7. #include <vector>
  8. #include <map>
  9. #include <queue>
  10. #include <set>
  11. #include <stack>
  12.  
  13. using namespace std;
  14.  
  15. typedef long long ll;
  16.  
  17. int main()
  18. {
  19.     ll n, a, v;
  20.     cin >> n >> a >> v;
  21.  
  22.     double answ;
  23.     double A = ((90 * (n - 2)) / (n*1.0))*(M_PI/180);
  24.     double r = a / (2 * sin(M_PI / (n*1.0)));
  25.  
  26.     answ = r/(v*cos(A)*1.0);
  27.     printf("%.6lf", v*answ*n);
  28.     _getch();
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment