@root

ykj04 Hi 2022-10-16 12:13:42 0
#include<bits/stdc++.h>
using namespace std;
int a[1000010];
int main(){
	for(int i=1;i<=12;i++) cin >> a[i];
	int money=0;
	int bank;
	int month=0;
	for(int i=1;i<=12;i++)
	{
		money+=300;
		if (money>=a[i])
		{
			bank+=((money-a[i])/100)*100;
			money=(money-a[i])%100;
		}
		else if (money<a[i])
		{
			month=i;
			break;
		}
	}
	if (month==0) cout << money+bank*1.2;
	else if (month!=0) cout << "-" << month;
}
{{ vote && vote.total.up }}