1 条题解
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a*a+b*b==c*c) cout<<a*b/2; else if(a*a+c*c==b*b) cout<<a*c/2; else if(c*c+b*b==a*a) cout<<b*c/2; else cout<<"no"; return 0; }
Python :
# coding=utf-8 x=int(input()) y=int(input()) z=int(input()) if x*x==z*z+y*y: print(round(z*y/2)) elif z*z==x*x+y*y: print(round(x*y/2)) elif y*y==x*x+z*z: print(round(x*z/2)) else: print("no")
- 1
信息
- ID
- 439
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 10
- 标签
- (无)
- 递交数
- 1
- 已通过
- 1
- 上传者