提交时间:2023-07-15 18:01:14

运行 ID: 23533

#include "bits/stdc++.h" using namespace std; int sl[1010],a,b,c,d,e,f,ans=0; int main(){ cin>>a>>b>>c>>d>>e>>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=a1+2*b1+3*c1+5*d1+e1*10+20*f1; sl[t]++; } } } } } } for(int i=1;i<=1000;i++)if(sl[i]>0)ans++; cout<<"Total="<<ans-4; }