#include <bits/stdc++.h> using namespace std; int main(){ int ten=2,five=8,one=40; //10元至少两张,1元数量不受影响 int count=0; while(five>0){ //每种纸币都要有 if((ten+five+one)==50){ count++; cout<<ten<<" "<<five<<" "<<one<<endl; } ten++; five-=2; } cout<<count; }