Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
33317 | qwertyuiop | 砝码称重 | C++ | 通过 | 0 MS | 252 KB | 453 | 2023-12-24 15:23:38 |
#include<bits/stdc++.h> using namespace std; long long a,b,c,d,e,f,s[1005],ans=0; int main(){ cin>>a>>b>>c>>d>>e>>f; for(int j=0;j<=a;j++){ for(int k=0;k<=b;k++){ for(int l=0;l<=c;l++){ for(int m=0;m<=d;m++){ for(int n=0;n<=e;n++){ for(int o=0;o<=f;o++){ s[j+2*k+3*l+5*m+10*n+20*o]++; } } } } } } for(int i=1;i<=1000;i++){ if(s[i]>0)ans++; } cout<<"Total="<<ans; return 0; }