21 条题解
-
2
张泽西 LV 6 @ 2019-02-27 09:14:30
这是我的第一个程序
"""
Created on Web Feb 27 08:48:00 2019@author:g2121122
"""
import math
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=math.sqrt((p-a)*(p-b)*(p-c)*p)
print('%.2f'%s) -
1@ 2021-08-04 21:28:36
虽然都是用python的,但是我还是整点烂活
(C++)
cpp
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
double a, b, c, p, ans;
int main()
{
scanf("%lf%lf%lf", &a, &b, &c);
p = (a + b + c) / 2.00;
ans = p * (p - a) * (p - b) * (p - c);
ans = sqrt(ans);
printf("%.2f", ans);
return 0;
}
-
1@ 2020-09-16 23:05:23
#python3
import math a=float(input()) b=float(input()) c=float(input()) p=(a+b+c)/2 s=math.sqrt(p*(p-a)*(p-c)*(p-b)) print('%.2f'%s) -
1@ 2019-05-07 11:02:18
#三角形面积计算
import math
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-c)*(p-b))
print('%.2f'%s) -
1@ 2019-04-25 12:23:41
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2;
ans=(p*(p-a)*(p-b)*(p-c))**0.5
print('%.2f'%ans) -
1@ 2017-10-06 18:02:53
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=(p*(p-a)*(p-b)*(p-c))**(1/2)
print('%.2f'%s) -
0@ 2024-06-16 07:22:31
import java.util.Scanner; import java.text.DecimalFormat; public class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); double a=s.nextDouble(); double b=s.nextDouble(); double c=s.nextDouble(); s.close(); double p=(a+b+c)/2; double S=Math.sqrt(p*(p-a)*(p-b)*(p-c)); DecimalFormat df=new DecimalFormat("0.00"); System.out.println(df.format(S)); } } -
0@ 2022-09-13 11:44:15
#海伦公式求三角形面积,同时判断三角形 #a,b,c均为三角形边长 import math a=int(input("a=")) b=int(input("b=")) c=int(input("c=")) if a+b>c and b+c>a and a+c>b: p=(a+b+c)/2 S=math.sqrt((p-a)*(p-b)*(p-c)*p) print('%.2f'%S) else: print("None") #2022.9.13 #北大附中高中部 2025届 明德书院 黄常棣 -
0@ 2021-06-27 17:59:12
a=int(input())
b=int(input())
c=int(input())
p=0.5*a+0.5*b+0.5*c
d=p-a
e=p-b
f=p-c
m=p*d*e*f
S=m**0.5
print('%.2f'%S) -
0@ 2020-09-15 16:08:35
#三角形面积计算
import math
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-c)*(p-b))
print('%.2f'%s) -
0@ 2020-09-15 16:07:37
#三角形面积计算
import math
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-c)*(p-b))
print('%.2f'%s) -
0@ 2019-12-12 11:01:46
import math
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-b)*(p-c))
print('%.2f'%s) -
0@ 2019-12-12 11:01:24
import math
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-b)*(p-c))
print('%.2f'%s) -
0@ 2019-11-26 10:42:57
import math
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-b)*(p-c))
print('%.2f'%s) -
0@ 2019-09-04 12:34:57
import math
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-c)*(p-b))
print('%.2f'%s) -
0@ 2019-04-25 22:59:52
import math
a=int(input())
b=int(input())
c=int(input())
p=(a+b+c)/2
s=math.sqrt(p*(p-a)*(p-b)*(p-c))
print('%.2f'%s) -
0@ 2019-04-25 22:02:16
import math
a=int(input())
b=int(input())
c=int(input())
p=int(a+b+c)/2
s=(math.sqrt(p*(p-a)*(p-b)*(p-c)))
print('%.2f'%s) -
0@ 2019-04-25 22:01:59
import math
a=int(input())
b=int(input())
c=int(input())
p=int(a+b+c)/2
s=(math.sqrt(p*(p-a)*(p-b)*(p-c)))
print('%.2f'%s) -
0@ 2018-12-13 11:21:29
a=float(input())
b=float(input())
c=float(input())
p=(a+b+c)/2
S=p*(p-a)*(p-b)*(p-c)**(1/2)
print('%.2f'%s) -
0@ 2018-10-30 17:16:03
#include <stdio.h> #include<iostream> #include<cmath> using namespace std; double a,b,c; int main() { cin>>a>>b>>c; double p=(a+b+c)/2; printf("%.2f",sqrt(p*(p-a)*(p-b)*(p-c))); }
信息
- 难度
- 2
- 分类
- (无)
- 标签
- (无)
- 递交数
- 8843
- 已通过
- 1728
- 通过率
- 20%
- 被复制
- 3
- 上传者