Run ID:62068

提交时间:2023-12-16 23:51:38

#include<iostream> #include<cstdio> using namespace std; int main(){ int a,b,c,d,e,f,g,h; cin>>a>>b>>c>>d>>e>>d>>g; if(g!=0){ for(int i=1;i<=a;i++){ h+=g; } } else if(f!=0){ for(int i=1;i<=a;i++){ h+=f; } } else if(e!=0){ for(int i=1;i<=a;i++){ h+=e; } } else if(d!=0){ for(int i=1;i<=a;i++){ h+=d; } } else if(c!=0){ for(int i=1;i<=a;i++){ h+=c; } } else if(b!=0){ for(int i=1;i<=a;i++){ h+=b; } } cout<<a*1+b*2+c*3+d*4+e*5+f*6+g*7+h+10; return 0; }