Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
2199 龚施宇 兑换硬币 C++ 通过 100 0 MS 248 KB 434 2019-11-10 15:57:46

Tests(4/4):


#include<iostream> using namespace std; int main(){ int money,total=0; cin>>money; money*=100; for(int f5=1;f5<money/5;f5++){ int left=money-f5*5; if(left%2==0) total+=left/2-1; else total+=left/2; } // for(int f5=1;f5<money/5;f5++){ // for(int f2=1;f2<money/2;f2++){ // for(int f1=1;f1<money;f1++){ // if(f5*5+f2*2+f1==money) // total++; // } // } // } cout<<total; return 0; }


测评信息: