P1089 津津的储蓄计划

Posted huafuyu--81

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了P1089 津津的储蓄计划相关的知识,希望对你有一定的参考价值。

#include<iostream>
using namespace std;
long y=0,c=0,a[13];
void s(int i){
if(y+300-a[i]<0){
cout<<"-"<<i;
return;
}
if(i>12){
cout<<1.2*c+y;
return;
}
y=y+300-a[i];
if(y>100){
c=c+y/100*100;
y=y%100;
}
s(i+1);
}
int main(){
long i;
for(i=1;i<=12;i++)cin>>a[i];
s(1);
return 0;
}              ——华榑羽

//或许可以改进,望各位大佬赐教,谢谢!

























以上是关于P1089 津津的储蓄计划的主要内容,如果未能解决你的问题,请参考以下文章

P1089 津津的储蓄计划

P1089 津津的储蓄计划

P1089 津津的储蓄计划

AC日记——津津的储蓄计划 P1089 (水!)

[NOIP2004] 提高组 洛谷P1089 津津的储蓄计划

P1089 津津的储蓄计划