题解 | #汽水瓶#
汽水瓶
https://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
#include <stdio.h> int main() { int n=0; while((scanf("%d",&n))!=EOF) { if(n==0) break; //1 2 3 4 5 6 7 8 //0 1 1 2 2 3 3 4 else printf("%d\n",n/2); } return 0; }
汽水瓶
https://www.nowcoder.com/practice/fe298c55694f4ed39e256170ff2c205f
#include <stdio.h> int main() { int n=0; while((scanf("%d",&n))!=EOF) { if(n==0) break; //1 2 3 4 5 6 7 8 //0 1 1 2 2 3 3 4 else printf("%d\n",n/2); } return 0; }
相关推荐