cpp
汽水瓶
http://www.nowcoder.com/questionTerminal/fe298c55694f4ed39e256170ff2c205f
实在是此类题目,多找找规律,傻乎乎递归写了好久
#include<iostream> using namespace std; int main() { int n; while (cin >> n && n != 0) { int a =n/2; cout << a << endl; } return 0; }
汽水瓶
http://www.nowcoder.com/questionTerminal/fe298c55694f4ed39e256170ff2c205f
实在是此类题目,多找找规律,傻乎乎递归写了好久
#include<iostream> using namespace std; int main() { int n; while (cin >> n && n != 0) { int a =n/2; cout << a << endl; } return 0; }
相关推荐