Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
23479 | 未命名(之人) | 砝码称重 | C++ | 解答错误 | 0 MS | 260 KB | 519 | 2023-07-15 15:55:29 |
#include "bits/stdc++.h" using namespace std; long long sl[1010],a,b,c,d,e,f,nm; int main(){ cin>>a>>b>>c>>d>>e>>f; nm=1*a+2*b+3*c+5*d+e*10+20*f; for(int a1=0;a1<a;a1++){ for(int b1=0;b1<b;b1++){ for(int c1=0;c1<c;c1++){ for(int d1=0;d1<d;d1++){ for(int e1=0;e1<e;e1++){ for(int f1=0;f1<a;f1++){ long long t=1*a1+2*b1+3*c1+5*d1+e1*10+20*f1; sl[t]++; } } } } } } int ans=0; for(int i=1;i<=nm;i++)if(sl[i]>0)ans++; cout<<"Total="<<ans; }