7 条题解
- 
  4
12239姚与露 (12239姚与露) LV 7 @ 2021-11-15 09:38:38
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
double p,s;
cin>>a>>b>>c;
if(a+b>c&&a+c>b&&b+c>a)
{
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s<<endl;
}
else
cout<<"NO"<<endl;return 0;
} - 
  0@ 2025-07-20 14:23:20
#include <bits/stdc++.h> using namespace std; double a,b,c; int main() { cin>>a>>b>>c; if(a+b>c&&a+c>b&&b+c>b) { double p=(a+b+c)/2; printf("%.2f",sqrt(p*(p-a)*(p-b)*(p-c))); } else cout<<"NO"; return 0; } - 
  0@ 2025-03-16 10:55:57
12239姚与露 (12239姚与露) LV 7 @ 3 年前
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
double p,s;
cin>>a>>b>>c;
if(a+b>c&&a+c>b&&b+c>a)
{
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s<<endl;
}
else
cout<<"NO"<<endl;return 0;
} - 
  0@ 2025-03-16 10:55:47
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
double p,s;
cin>>a>>b>>c;
if(a+b>c&&a+c>b&&b+c>a)
{
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s<<endl;
}
else
cout<<"NO"<<endl;return 0;
}zhuankeng袁皓轩 - 
  -1@ 2022-07-01 14:42:15
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double a,b,c;
cin >> a >> b >> c;
if(a + b > c && a + c > b && b + c > a)
if(a - b < c && a - c < b && b - c < a)
{
double p = (a + b + c) / 2;
double s = sqrt(p * (p - a) * (p - b) * (p - c));
printf("%.2f",s);
}
else
printf("NO");
else
printf("NO");
return 0;
//题目打错了,应为 s = √ p(p - a)(p - b)(p - c)
} - 
  -1@ 2021-11-03 20:22:19
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;double p;
cin>>a>>b>>c;p=(a+b+c)/2.0;
if(a+b>c&&a+c>b&&c+b>a)
cout<<fixed<<setprecision(2)<<sqrt(p*(p-a)*(p-b)*(p-c));
else
cout<<"NO"<<endl;
return 0;
} - 
  -2@ 2021-11-08 21:42:53
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
double p,a,b,c;
cin>>a>>b>>c;p=(a+b+c)/2.0;
if(a+b>c&&b+c>a&&c+a>b)
cout<<fixed<<setprecision(2)<<sqrt(p*(p-a)*(p-b)*(p-c));
else
cout<<"NO";
return 0;
} 
- 1
 
信息
- ID
 - 1701
 - 难度
 - 6
 - 分类
 - (无)
 - 标签
 - 递交数
 - 514
 - 已通过
 - 151
 - 通过率
 - 29%
 - 被复制
 - 4
 - 上传者