Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149386 左锶焜 19斯诺克比赛 C++ Accepted 0 MS 276 KB 550 2026-03-10 19:53:54

Tests(5/5):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[8],s=0; for(int i=1;i<=7;i++){ cin>>a[i];} if(a[1]){ for(int i=7;i>=1;i--) if(a[i]){ s+=a[1]*(i+1); break;} } for(int i=2;i<=7;i++) s+=a[i]*i; cout<<s; return 0; }