Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
33315 qwertyuiop 砝码称重 C++ 解答错误 0 MS 252 KB 443 2023-12-24 15:23:01

Tests(0/10):


#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<<ans; return 0; }


测评信息: