萌新刚学oi 求救o(╥﹏╥)o,第5点wa

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

@[Gaozhongsheng](/user/908952) ~~悬赏关注吗~~
by SCAR_L @ 2023-08-09 21:32:34


先贴我的代码: ```cpp #include <iostream> #include <stdio.h> #include <algorithm> #include <cmath> #include <string> using namespace std; int main() { int a[15]; for(int i=1;i<=12;i++)cin>>a[i]; int m=0,b=0; for(int i=1;i<=12;i++) { m+=300; m-=a[i]; if(m<0){cout<<"-"<<i;return 0;} b+=(m/100)*100; m%=100; } cout<<m+(1.0*b/5*6); return 0; } ```
by SCAR_L @ 2023-08-09 21:33:15


@[SCAR_L](/user/608703) 谢谢谢谢\(^o^)/~
by Gaozhongsheng @ 2023-08-10 10:29:15


@[SCAR_L](/user/608703) 谢谢谢谢\(^o^)/~已关注
by Gaozhongsheng @ 2023-08-10 10:32:08


@[Gaozhongsheng](/user/908952) 啊这~~其实我以为还要帮您挑错呢~~
by SCAR_L @ 2023-08-10 11:35:05


@[SCAR_L](/user/608703) 我也以为,~~但是我看你没有,就没敢说~~
by Gaozhongsheng @ 2023-08-10 17:31:32


@[Gaozhongsheng](/user/908952) 额,互关啦~
by SCAR_L @ 2023-08-10 21:23:46


@[SCAR_L](/user/608703) 大佬可以看看哪里错了吗_φ_(..)
by Gaozhongsheng @ 2023-08-11 07:56:30


@[Gaozhongsheng](/user/908952) 可以呢~(虽然可能看不出来)
by SCAR_L @ 2023-08-11 08:03:04


@[Gaozhongsheng](/user/908952) 是不是不用写的那么复杂?
by SCAR_L @ 2023-08-11 08:07:42


| 下一页