1. 程式人生 > >HDU 2149: Public Sale (in Java)

HDU 2149: Public Sale (in Java)

ati oid php sans color == font ner pid


/**
* @link http://acm.hdu.edu.cn/showproblem.php?pid=2149
* @author Sycamore
* @date Aug, 21
*/
import java.util.*;

class Main{

public static void main(String args[]){
Scanner scanner=new Scanner(System.in);
while(scanner.hasNextInt()){
int m=scanner.nextInt(),n=scanner.nextInt();
int
mod=m%(n+1);
if(mod==0){
System.out.println("none");
continue;
}
if(m<=n){
for(int i=m;i<n;i++)
System.out.print(i+" ");
System.out.println(n);
}
else{
System.out.println(mod);
}
}

scanner.close();
}
}

HDU 2149: Public Sale (in Java)