1 条题解
-
0
#include<bits/stdc++.h> using namespace std; #define int long long map<int,int>mp; int dfs(int x) { if(mp[x]) { return mp[x]; } if(x==0) { return 1; } mp[x]=dfs(x/2)+dfs(x/3); return mp[x]; } signed main() { int n; scanf("%lld",&n); printf("%lld\n",dfs(n)); return 0; }
- 1
信息
- ID
- 7745
- 时间
- 2000ms
- 内存
- 1024MiB
- 难度
- 6
- 标签
- 递交数
- 69
- 已通过
- 19
- 上传者