problem
tan90
solution
tan90
codes
#include<iostream>
using namespace std;
int main(){
int flag = 0, t = 0, res = 0;
for(int i = 0; i < 12; i++){
int x; cin>>x;
t += 300-x;
if(t < 0){ flag = (i+1)*-1; break;}
else{
res += t/100;
t %= 100;
}
}
if(!flag)cout<<t+res*120;
else cout<<flag;
return 0;
}