1 条题解
-
0
C++ :
#include <iostream> using namespace std; int main() { int a,b,c,t,s; cin>>a>>b>>c; if(a < b) { t = a; a = b; b = t; } if(a < c) { t = a; a = c; c = t; } if(b < c) { t = b; b = c; c = t; } s = a * b + b * c * 2 + a * c * 2; cout<<s; return 0; }
Python :
sr=input().split() a=int(sr[0]) b=int(sr[1]) c=int(sr[2]) s=0 s=(a*b+a*c+b*c)*2 if a*b>a*c and a*b>b*c: s=s-a*b elif a*c>a*b and a*c>b*c: s=s-a*c else: s=s-b*c print(s)
- 1
信息
- ID
- 2260
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者