13 条题解
-
0
Guest
-
-2
#include <stdio.h>#include<stdlib.h>#include<math.h>int main(){ double a, b, c,area,s,max,min; scanf("%lf%lf%lf", &a, &b, &c); if ((a + b > c && a + c > b && b + c > a) && (a > b - c && b > a - c && c > a - b)) { s = (a + b + c) / 2; area = sqrt(s * (s - a) * (s - b) * (s - c)); printf("%.2lf\n", area); } else { if (a > b) max = a, min = b; else max = b, min = a; if (c > max) max = c; else max = max; if (c < min) min = c; else min = min; printf("%.2lf", max - min); } system("pause"); return 0;}
信息
- ID
- 11
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 260
- 已通过
- 134
- 上传者