Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101760 小徐老师 19斯诺克比赛 C++ Accepted 1 MS 272 KB 349 2024-12-17 19:53:21

Tests(5/5):


Code:

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