码迷,mamicode.com
首页 > 编程语言 > 详细

HDU 2149: Public Sale (in Java)

时间:2017-08-21 17:25:00      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:int   ati   one   rgs   ==   system   nbsp   lin   php   


/**
* @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)

标签:int   ati   one   rgs   ==   system   nbsp   lin   php   

原文地址:http://www.cnblogs.com/zjnu/p/7405525.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!