Problem description Although do not want, but reality is always reality, Lele never escaped the fate of withdrawal, because he did not get scholarship. What awaits him now is a field career like Farmjohn.
To farm to have a field to do, Lele heard that the street is holding a spectacular auction, the auction of goods is just a piece of 20 acres of field. So Lele took all his savings and rushed to the auction.
Later found that the entire auction will be only Lele and his dead rival Yueyue.
By asking, Lele know the rules of the auction is this: the initial reserve price of 0, two people take turns to start the fare increase, but each increase in the range between 1~n, when the price is greater than or equal to the cost of the field M, the organizer will sell this field to the price of the person.
Lele and Yueyue Although the exam is not good, but the auction is very proficient, and they are two people are very much want this field. So they always choose the most advantageous way for them to make the fare increase.
Because Lele dictionary order than Yueyue front, so each time is lele first start fare increase, excuse me, the first time,
How much does Lele want to make sure he can get the land?
Input This topic contains multiple sets of tests, please process to end of file (EOF). Each group of tests takes one row.
Each set of tests contains two integers M and N (meaning see topic Description, 0<N,M<1100)
Output for each set of data, in a row in ascending order of Lele the first time the price can be added. Two data is separated by a space.
If Lele is unable to buy the land for the first time in any bid, it will output "none".
Sample Input4 23 23 5
Sample Output1none3 4 5
#include <iostream>using namespacestd;intMain () {intn,m; while(cin>>m>>n)//m is the desired price, n is the interval amplitude { if(M% (n+1)==0) {cout<<"None"<<Endl; } Else if(m<=N) { for(inti=m;i<n;i++) cout<<i<<" "; cout<<n<<Endl; } Else{cout<<m% (n+1) <<Endl; } } return 0;}
HDU 2149 public Sale Simple Game