| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 5692 | 王冯俊 | 汽水瓶 | C++ | Compile Error | 0 | 0 MS | 0 KB | 407 | 2020-08-14 17:15:25 |
#include<assert.h> int main() { int a; int count = 0;//记录可喝的可乐数 while (cin >> a) { int x, y; count = 0;//初始化记录可乐数(循环操作中用到) while (a >= 3) { x = a / 3; y = a % 3; a = x + y; count += x; } if (a == 2)// a出来后一定小于三 cout << count + 1 << endl; else cout << count << endl; } return 0; }