标签:bsp c++ ++ return mon else main include its
#include<bits/stdc++.h>
int main(){
int x=0,money[12]={0},hand=0,dep=0;
for(int i=0;i<12;i++){
hand+=300;
scanf("%d",&money[i]);
if((hand-money[i])>=0){dep+=(hand-money[i])/100*100;
}
else x=-i-1;
// printf("活动金额:%d,x的值:%d\n",hand-money[i],x);
hand=hand-(hand-money[i])/100*100-money[i];
// printf("剩余钱数:%d,妈妈那得存款:%d\n",hand,dep);
}
hand+=dep*1.20;
if(x<0){printf("%d",x);
return 0;
}
printf("%d",hand);
return 0;
}
标签:bsp c++ ++ return mon else main include its
原文地址:https://www.cnblogs.com/duanry/p/11743944.html