题解 | #汽水瓶#
汽水瓶
http://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
每两个空瓶子可以换一个瓶子,有些取巧。
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int emptyBottle = sc.nextInt();
if (emptyBottle != 0) {
System.out.println(emptyBottle / 2);
}
}
}
}