Codeforces27E Number With The Given Amount Of Divisors
来源:互联网 发布:ios远程mac 编辑:程序博客网 时间:2024/06/11 02:46
题目:http://codeforces.com/problemset/problem/27/E
分析:详见上一篇博文
代码:
#include <cstdio>#include <algorithm>using namespace std;const int pri[20]={0,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53};int n;long long int ans=1000000000000000000;void dfs(int p,long long sum,int num){ if(num>n) return; if(num==n) { ans=min(ans,sum); return; } int i; for(i=1;i<=n;i++) { if(ans/pri[p]<=sum) break; dfs(p+1,sum*=pri[p],num*(i+1)); } return;}int main(){ scanf("%d",&n); dfs(1,1,1); printf("%I64d",ans); return 0;}
0 0
- Codeforces27E Number With The Given Amount Of Divisors
- CF27.E. Number With The Given Amount Of Divisors
- CF 27E Number With The Given Amount Of Divisors
- 27E - Number With The Given Amount Of Divisors
- Codeforces 27E - Number With The Given Amount Of Divisors
- Codeforces 27E Number With The Given Amount Of Divisors
- Codeforces 27 E Number With The Given Amount Of Divisors
- CodeForces 27E Number With The Given Amount Of Divisors
- CF Number With The Given Amount Of Divisors
- codeforces 27E Number With The Given Amount Of Divisors
- zoj2562 More Divisors && CF27E. Number With The Given Amount Of Divisors(反素数)
- CF-27E - Number With The Given Amount Of Divisors(枚举+dfs)
- codeforces 27E E. Number With The Given Amount Of Divisors(dp+数论)
- CodeForces - 27E Number With The Given Amount Of Divisors (反素数入门)
- Ccodeforces 27E Number With The Given Amount Of Divisors(数论+搜索)
- [CodeForces 27E] Number With The Given Amount Of Divisors (数论 + 反素数)
- Codeforeces 27 E Number With The Given Amount Of Divisors(反素数)
- day4 CodeForces 27E Number With The Given Amount Of Divisors
- pt-align
- 最开初c标准规定sizeof只能编译时求值,后来c99又补充规定sizeof可以运行时求值
- ACSII,GB2312,GBK,GB18030,Unicode,UTF8,UTF16,UTF32,BOM区别与转换——字符编码最全总结
- Failed to load JavaHL Library
- HDOJ 5483 Nux Walpurgis
- Codeforces27E Number With The Given Amount Of Divisors
- android 应用分配内存查看代码
- 第三方类库masonry(自动布局)的使用
- oc实现多继承
- 关于动画杂谈
- pyqt 批量ping一个网段 返回结果 的程序 (加了个界面 效果不理想)
- iOS开源项目学习——开源中国iOS客户端
- Android之Handler用法总结
- HDU 5469 Antonidas(树上的字符串匹配/搜索)