Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
29525 曹梓洺 津津的储蓄计划 C++ 通过 0 MS 248 KB 352 2023-10-30 21:16:48

Tests(1/1):


#include<iostream> using namespace std; int main() { int m1=0, total=0,x,m2; bool flag=false; for(int i=1;i<=12;i++){ m1+=300; cin>>m2; if(m1<m2 &&!flag){ x=i; flag=true; }else{ m1-=m2; total+=(m1/100*100); m1=m1%100; } } if(flag==true) cout<<-1*x; else{ cout<<total*1.2+m1; } return 0; }


测评信息: