| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 32551 | 董承诺 | 津津的储蓄计划 | C++ | Accepted | 100 | 0 MS | 256 KB | 415 | 2022-02-11 19:40:02 |
#include<bits/stdc++.h> using namespace std; int main(){ int left=0,give[13],month=0,mum=0; for(int i=1;i<=12;i++){ cin>>give[i]; } for(int i=1;i<=12;i++){ left+=300; left-=give[i]; if(left>=100){ mum+=(left/100)*100; left=left%100; } if(left<0){ month=i; break; } } if(month!=0) printf("-%d",month); else printf("%.0lf",left+mum*1.2); return 0; }