| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 168520 | 陈道宁 | 幂次方 | C++ | Wrong Answer | 14 | 1 MS | 248 KB | 386 | 2024-08-20 11:18:21 |
#include<bits/stdc++.h> using namespace std; void dfs(int n){ while(n>0){ int temp=1,x=1; while(temp<=n){ x++; temp*=2; } x--; if(x==1){ cout<<"2(0)"; } else if(x==2){ cout<<"2"; } else{ cout<<"2("; dfs(temp/4); cout<<")"; } n-=temp/2; if(n!=0){ cout<<"+"; } } } int main(){ int n; cin>>n; dfs(n); }