Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio>
- #include<algorithm>
- #include<cstring>
- #include<string>
- #include<sstream>
- #include<math.h>
- #define pi 2*acos(0.0)
- using namespace std;
- int main() {
- double s, a;
- char str[5];
- while (scanf("%lf%lf%s", &s, &a, str) == 3) {
- s += 6440;
- if (a > 180)
- a = 360 - a;
- if (!strcmp(str, "min"))
- a = a / 60.0;
- a = (pi * a) / 180.0;
- printf("%0.6lf %0.6lf\n", s * a, 2 * s * sin(a / 2.0));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement