1 #include<iostream> 2 using namespace std; 3 int main(){ 4 int n,y,f,flag=1; 5 cin>>n; 6 for(y=0;y<100;y++) 7 for(f=0;f<100;f++) 8 if((n+2*f+200*y)==(y+100*f)){ 9 cout<<y<<"."<<f<<endl; 10 flag=0; 11 } 12 if(flag) 13 cout<<"No Solution"<<endl; 14 return 0; 15 }
循环-09. 支票面额(15)
时间: 2024-11-08 13:08:24