提交时间:2019-11-09 17:09:33

运行 ID: 2140

#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; }