1 条题解
-
0
跟P243中有些相似,不直接输出样例的最简
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a=n%10,b=n/10%10,c=n/100; if (min(min(a,b),c)==0) if (max(max(min(a,b),min(a,c)),min(b,c))==0) cout<<max(max(a,b),c)*100-max(max(a,b),c); else cout<<max(max(a,b),c)*100+10*min(min(max(a,b),max(a,c)),max(b,c))-max(max(min(a,b),min(a,c)),min(b,c))*10-max(max(a,b),c); else cout<<max(max(a,b),c)*100+min(min(max(a,b),max(b,c)),max(a,c))*10+min(min(a,b),c)-min(min(a,b),c)*100-max(max(min(a,b),min(a,c)),min(b,c))*10-max(max(a,b),c); return 0; }
- 1
信息
- ID
- 677
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 1
- 标签
- 递交数
- 55
- 已通过
- 45
- 上传者