题解 | #汽水瓶#
汽水瓶
http://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
看到大神解法
确实2瓶换一瓶,毕竟换后那一瓶归还老板就相当于抵消了
import java.util.*;
public class Main{
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int n = sc.nextInt();
if (n == 0){
break;
}else
System.out.println(n/2);
}
}
}