Run ID:141466
提交时间:2025-12-25 11:36:38
#include <iostream> //designed by hu 2025-10 using namespace std; int main(){ int r; int a[6] ={}; int v[6]= {2, 3, 4, 5, 6, 7}; cin >>r; for(int i=0;i<6;i++) { cin >> a[i]; } int m=0; for(int i=0;i<6;i++) { if(a[i]>0) m = v[i]; } int phase1 = r*(1+m); int phase2 = 0; for(int j=0;j<6;j++) { phase2 += a[j]*v[j]; } cout<< phase1 + phase2; return 0; }