题解 | #汽水瓶#

汽水瓶

http://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f

import java.util.*;


public class Main{
    public static void main(String[] arg){
        Scanner sc=new Scanner(System.in);
        String str="";
        while(!("0".equals((str=sc.nextLine())))){
            int n = Integer.parseInt(str);
            if(n==1){
                System.out.println(0);
            }else{
                System.out.println(n/2);
            }
        }

    }
}
全部评论

相关推荐

02-25 13:02
中南大学 C++
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务