Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101761 汤奕硕 19斯诺克比赛 C++ Accepted 1 MS 272 KB 314 2024-12-17 20:03:41

Tests(5/5):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int p=0; int n=0; int a[7]; for(int i=0; i<7; ++i){ cin>>a[i]; if(a[i]>0) p=i; } n+=(p+2)*a[0]; for(int i=2; i<=7; ++i){ n+=i*a[i-1]; } cout<<n; return 0; }