注意题目中的一句话:If a number m has bigger evaluating value than all the numbers smaller than it。。。

这让我重新想过反素数的定义,应该 是比n小的数的约数的个数都  小于  n。所以,应该取最小的一个值

#include <iostream>
#include <cstdio>
#include <algorithm>
#define LL __int64
using namespace std;
LL n,ans,c; LL p[16]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53}; void solve(LL dep, LL tmp, LL num){
if(tmp>n) return ;
if(num>c||(num==c&&tmp<ans)){
ans=tmp;
c=num;
}
// cout<<tmp<<endl;
for(LL i=1;i<=60;i++){
if(tmp*p[dep]>n) break;
solve(dep+1,tmp*p[dep],num*(i+1));
tmp*=p[dep];
}
} int main(){
int t,kase=0;
scanf("%d",&t);
while(t--){
scanf("%I64d",&n);
ans=-1;
c=0;
solve(0,1,1);
printf("Case #%d: %I64d\n",++kase,ans);
}
return 0;
}

  

HDU 4133的更多相关文章

  1. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  2. 【HDU 3037】Saving Beans Lucas定理模板

    http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #i ...

  3. hdu 4859 海岸线 Bestcoder Round 1

    http://acm.hdu.edu.cn/showproblem.php?pid=4859 题目大意: 在一个矩形周围都是海,这个矩形中有陆地,深海和浅海.浅海是可以填成陆地的. 求最多有多少条方格 ...

  4. HDU 4569 Special equations(取模)

    Special equations Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u S ...

  5. HDU 4006The kth great number(K大数 +小顶堆)

    The kth great number Time Limit:1000MS     Memory Limit:65768KB     64bit IO Format:%I64d & %I64 ...

  6. HDU 1796How many integers can you find(容斥原理)

    How many integers can you find Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d ...

  7. hdu 4481 Time travel(高斯求期望)(转)

    (转)http://blog.csdn.net/u013081425/article/details/39240021 http://acm.hdu.edu.cn/showproblem.php?pi ...

  8. HDU 3791二叉搜索树解题(解题报告)

    1.题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=3791 2.参考解题 http://blog.csdn.net/u013447865/articl ...

  9. hdu 4329

    problem:http://acm.hdu.edu.cn/showproblem.php?pid=4329 题意:模拟  a.     p(r)=   R'/i   rel(r)=(1||0)  R ...

随机推荐

  1. xcode Could not launch "" ; has denied the launch request

    xcode Could not launch "" ;  “”“ has denied the launch request  (注意,这种方式不能调试) 1.编辑scheme 2 ...

  2. GammaRay 是一个允许你查看 Qt 应用程序甚至在某种程度上修改它的独特应用,可谓是 Debugger 的良好补充

    GammaRay is a tool to poke around in a Qt-application and also to manipulate the application to some ...

  3. 国外物联网平台初探(五) ——Exosite Murano

    定位 Murano是一个基于云的IoT软件平台,提供安全.可扩展的基础设施,支持端到端的生态系统,帮助客户安全.可扩展地开发.部署和管理应用.服务以及联网产品. 功能 Murano平台简化了整个IoT ...

  4. JavaScript:DOM对象

    ylbtech-JavaScript:DOM对象 1. HTML DOM Document 对象返回顶部 1. HTML DOM Document 对象 HTML DOM 节点 在 HTML DOM ...

  5. Tool-Java:Eclipse

    ylbtech-Tool-Java:Eclipse Eclipse 是一个开放源代码的.基于Java的可扩展开发平台.就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境.幸运的是,E ...

  6. JS中的数据类型及判断数据类型的方法

    简单类型(基本类型): number,string,boolean,null,undefined 复杂类型(引用类型):object typeof 只能判断基本数据类型 instanceof 能够判断 ...

  7. Codeforces Round #198 (Div. 2)E题解

    E. Iahub and Permutations Iahub is so happy about inventing bubble sort graphs that he's staying all ...

  8. 9.13[XJOI] NOIP训练32

    今日9.13 洛谷打卡:小吉(今天心情不错,决定取消密码) (日常记流水账) 上午 今天听说是鏼鏼的题目,题面非常的清真啊,也没有当初以为的爆零啊 T1 排排坐 非常非常清真的模拟或是结论题,再次将难 ...

  9. Elasticsearch之curl创建索引库和索引时注意事项

    前提, Elasticsearch之curl创建索引库 Elasticsearch之curl创建索引 注意事项 1.索引库名称必须要全部小写,不能以下划线开头,也不能包含逗号 2.如果没有明确指定索引 ...

  10. SqlServer备份恢复

      备份 (Transact SQL) | Microsoft Docs   https://docs.microsoft.com/zh-cn/sql/t-sql/statements/backup- ...