Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
34437 | 奚晨瑞 | 津津的储蓄计划 | C++ | Wrong Answer | 0 MS | 260 KB | 426 | 2023-12-22 15:51:09 |
#include<iostream> using namespace std; int main() { int mom=0; int jin=0; bool not_enough_money=0; for(int i=0;i<12;i++){ int exp; cin>>exp; if(300+jin<exp){ not_enough_money=1; for(int j=i+1;j<12;j++){ int a; cin>>a; } cout<<-i-1; break; } jin=300+jin-exp; mom+=jin/100; jin=jin%100; } if(not_enough_money=0){ cout<<mom*1.2+jin; } return 0; }