Miyu original, post Please note: Reprinted from
__________ White House
Question address:
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 2149
Description:Public Sale
Time limit:1000/1000MS (Java/Others) memory limit:32768/32768K (Java/Others)
Total submission (s ):719Accepted submission (s ):419
Problem description
Although I don't want to, the reality is always a reality. Lele never escaped the fate of dropping out of school because he didn't get a scholarship. Now he is waiting for his farmland career like farmjohn.
Lele heard that there was a special auction on the street, and the auction of items was just a 20-acre field. So Lele took all his savings and rushed to the auction.
Later, we found that the auction only lasted for Lele and Yueyue.
Lele knew the auction rule was as follows: the reserve price was 0 at the beginning, and two people started to raise the price in turn, but each price increase was within 1 ~ Between N, when the price is greater than or equal to the cost of the field m, the organizer will sell the field to the price caller.
Although Lele and Yueyue cannot take the test, they are very proficient in the auction, and both of them really want this field. Therefore, each time they choose the most favorable way to increase their prices.
Because the Lele Lexicographic Order is higher than Yueyue, each time Lele starts to raise the price. Excuse me, when I first raise the price,
How much does Lele need to make sure they can buy this land?
Input
This topic contains multiple groups of tests. Please process it until the end of the file (EOF ). Each group of tests occupies one row.
Each group of tests contains two integers, M and N,0<N, m<1100)
Output
For each group of data, the price that Lele can add for the first time is output in an ascending order. The two data are separated by spaces.
If Lele cannot buy this land at the first bid"None".
Sample Input
4 2
3 2
3 5
Sample output
1
None
3 4 5
Question Analysis: A simple bash game. Just control the output based on the meaning of the question. If you are not clear, click the game to get started.
CodeAs follows:Miyu original, post Please note: Reprinted from__________ White House
# Include < Iostream >
Int Main ()
{
Int N, m;
While (Scanf ( " % D " , & M, & N) ! = EOF)
{
If (M % (N + 1 ) = 0 )
{
Puts ( " None " );
}
Else
{
If (N > = M)
{
For ( Int I = M; I <= N; ++ I)
{
Printf (I = M ? " % D " : " % D " , I );
}
Putchar ( ' \ N ' );
}
Else
{
Printf ( " % D \ n " , M % (N + 1 ));
}
}
}
Return 0 ;
}