Run ID:101761
提交时间:2024-12-17 20:03:41
#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; }