牛客网 牛客小白月赛1 E.圆与三角形-公式题

E.圆与三角形
 
 
 
这个题把公式推一下,
发现就是1+sinA*r,sinA最大为1,所以最大值就是1+r。
 
代码:
 1 #include<iostream>
 2 #include<cstring>
 3 #include<cstdio>
 4 #include<cmath>
 5 #include<cstdlib>
 6 #include<algorithm>
 7 using namespace std;
 8 typedef long long ll;
 9 int main(){
10     double r;
11     scanf("%lf",&r);
12     printf("%.2f
",r+1);
13 }
原文地址:https://www.cnblogs.com/ZERO-/p/9729006.html