Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140328 蔡胤泽 19斯诺克比赛 C++ Accepted 0 MS 272 KB 356 2025-12-14 11:04:56

Tests(5/5):


Code:

#include <iostream> using namespace std; int main(){ int n = 0, m; int a[8]; for(int i = 1;i <= 7;i++) { cin >> a[i]; } for(int i = 1;i <= 7;i++) { if(a[i] != 0) { n += a[i] * i; } } for(int i = 7;i >= 1;i--) { if(a[i] > 0) { n += i * a[1]; break; } } cout << n; return 0; }