| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 112242 | 陈星云 | 整数拆分 | C++ | Accepted | 100 | 0 MS | 248 KB | 252 | 2023-11-25 11:06:37 |
#include<bits/stdc++.h> using namespace std; int n,ans; int main() { cin>>n; if(n<=2) {cout<<1;return 0;} if(n==3) {cout<<2;return 0;} ans=1; for(int i=1;i<n/3;i++) ans*=3; if(n%3==2) ans*=6; else ans*=(3+(n%3)); cout<<ans<<endl; }