津津的储蓄计划

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

=。=
by SW_Wind @ 2017-06-19 10:29:44


哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
by Yubestor @ 2017-06-27 20:32:59


```cpp #include<iostream> #include<cstdio> #include<cmath> using namespace std; int main(){ int c=0,a[13],i,j,b=300,d=0; for(i=1;i<=12;i++) cin>>a[i]; for(j=1;j<=12;j++) { b=300; b=300-a[j]; if(c+b>=0) { c=c+b; if(c/100>0) d=d+c/100; c=c-c/100*100; } else { printf("-%d",j); j=14; } } if(j==13)cout<<c+d*120; return 0; } 拿去不谢 反正也不是我做的哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈语言C++ ```
by Yubestor @ 2017-06-27 20:35:35


……
by tang20050416 @ 2017-07-05 19:54:06


|