17 条题解
-
0
函数:
#include<iostream> #include<iomanip> #include<cmath> using namespace std; double f(double a, double b, double c) { double p = (a + b + c) / 2; return sqrt(p * (p - a) * (p - b) * (p - c)); } int main() { double a, b, c; cin >> a >> b >> c; cout << fixed << setprecision(2) << f(a, b, c); return 0; }
-
0
#include #include <stdio.h> #include <string.h> #include #include <math.h> #include #include #include #include #include <bits/stdc++.h> using namespace std; int main(){ double a,b,c,p,m; cin>>a>>b>>c; p=(a+b+c)/2; double sum; m= p * (p - a) * (p - b) * (p - c); cout << fixed << setprecision(2) << sqrt(m);
return 0;
}
-
-4
#include <iostream> #include <stdio.h> #include <string.h> #include <queue> #include <math.h> #include <vector> #include <algorithm> #include <iomanip> #include <stack> using namespace std; #define LL long long const int N =1e5+10; const int INF =0x3f3f3f3f; int main(){ double a,b,c,p; cin>>a>>b>>c; p=(a+b+c)/2; cout<<fixed<<setprecision(2)<<sqrt(p*(p-a)*(p-b)*(p-c))<<endl; return 0; }
- 1
信息
- ID
- 822
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 1117
- 已通过
- 408
- 上传者