Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154008 余建成 19斯诺克比赛 C++ Accepted 1 MS 272 KB 306 2026-05-24 12:01:59

Tests(5/5):


Code:

#include<iostream> using namespace std; int main(){ int i,t[8]={ },max=0; for(int i=1;i<=7;i++)cin>>t[i]; if(t[1]!=0){ i=7; while(t[i]==0)i--; if(i==1){ cout<<1<<endl; return 0; } else max+=t[1]*(1+i); } for(int j=2;j<=7;j++)max+=t[j]*j; cout<<max<<endl; return 0; }