| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 5916 | 顾郁铭 | 汽水瓶 | C++ | Accepted | 100 | 0 MS | 248 KB | 270 | 2020-08-16 20:08:06 |
#include<bits/stdc++.h> using namespace std; int n,left1,ans; int main(){ while(1){ cin>>n; if(n==0) break; ans=0; left1=n; while(left1>=2){ ans+=left1/3; left1=ans+n-ans*3; if(left1==2) ans++; } cout<<ans<<endl; } return 0; }