Problem Description

A DFS(digital factorial sum) number is found by summing the factorial of every digit of a positive integer.

For example ,consider
the positive integer 145 = 1!+4!+5!, so it's a DFS number.

Now you should
find out all the DFS numbers in the range of int( [1, 2147483647]
).

There is no input for this problem. Output all the DFS numbers in
increasing order. The first 2 lines of the output are shown below.

Input

no input

Output

Output all the DFS number in increasing order.

Sample Output

1
2
......

Author

zjt

 #include<stdio.h>
int main()
{
printf("1\n2\n145\n40585\n");
return ;
}
 
 
敲代码算出来(时间有点长....发现只有四个答案就)
 

HDU 2212 DFS的更多相关文章

  1. HDOJ(HDU) 2212 DFS(阶乘相关、)

    Problem Description A DFS(digital factorial sum) number is found by summing the factorial of every d ...

  2. HDU 5143 DFS

    分别给出1,2,3,4   a, b, c,d个 问能否组成数个长度不小于3的等差数列. 首先数量存在大于3的可以直接拿掉,那么可以先判是否都是0或大于3的 然后直接DFS就行了,但是还是要注意先判合 ...

  3. Snacks HDU 5692 dfs序列+线段树

    Snacks HDU 5692 dfs序列+线段树 题意 百度科技园内有n个零食机,零食机之间通过n−1条路相互连通.每个零食机都有一个值v,表示为小度熊提供零食的价值. 由于零食被频繁的消耗和补充, ...

  4. HDU 5877 dfs+ 线段树(或+树状树组)

    1.HDU 5877  Weak Pair 2.总结:有多种做法,这里写了dfs+线段树(或+树状树组),还可用主席树或平衡树,但还不会这两个 3.思路:利用dfs遍历子节点,同时对于每个子节点au, ...

  5. hdu 4751(dfs染色)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4751 思路:构建新图,对于那些两点连双向边的,忽略,然后其余的都连双向边,于是在新图中,连边的点是能不 ...

  6. HDU 1045 (DFS搜索)

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1045 题目大意:在不是X的地方放O,所有O在没有隔板情况下不能对视(横行和数列),问最多可以放多少个 ...

  7. HDU 1241 (DFS搜索+染色)

    题目链接:  http://acm.hdu.edu.cn/showproblem.php?pid=1241 题目大意:求一张地图里的连通块.注意可以斜着连通. 解题思路: 八个方向dfs一遍,一边df ...

  8. HDU 1010 (DFS搜索+奇偶剪枝)

    题目链接:  http://acm.hdu.edu.cn/showproblem.php?pid=1010 题目大意:给定起点和终点,问刚好在t步时能否到达终点. 解题思路: 4个剪枝. ①dep&g ...

  9. hdu 1716(dfs)

    题目链接 : http://acm.hdu.edu.cn/showproblem.php?pid=1716     排列2   Problem Description Ray又对数字的列产生了兴趣:现 ...

随机推荐

  1. sublime vue 语法高亮插件安装

    默认情况下,Vue.js 的单文件组件(*.vue)在 sublime 编辑器中是不被识别的.若要想高亮显示,需要安装插件 Vue Syntax Hightlight.安装步骤如下:   第一,在 s ...

  2. 移动开发meta集合【精】

    以下是开发中经常用到的meta标签 1.移动webAPP的Meta 用法: <meta content="width=device-width, initial-scale=1.0, ...

  3. Jmeter之基本介绍

    初学Jmeter,以下是我常用的功能,总结一下. 1.Thread Group线程组 线程组,即:虚拟用户组

  4. hdu 4342 History repeat itself(数学题)

    题目链接:hdu 4342 History repeat itself 题意: 让你找第a个非完全平方数m,并且求前m个数的开方向下取整的和. 题解: 第一个问题: 假设第a个非平方数是X,X前面有n ...

  5. jxl 导入excel

    jsp部分 <div class="modal-dialog"> <div class="modal-content"> <div ...

  6. wpf 线程与界面线程

    Thread thread = new Thread(new ThreadStart(() =>        {            VisualTarget visualTarget =  ...

  7. DBCP数据源的使用

    DBCP(DataBase Connection Pool)是一个开源的数据源工具,实际开发直接使用就行了 导入需要的jar包,数据库使用mysql测试

  8. Silverlight 中MatrixTransform和其他Transform的数值转换

    对各种transform的讲解已经很多了,但是有时MatrixTransform和其他transform变换效果之间需要转换时,变换量的转换又如何呢?下面的类就完成了Matrix和其他transfor ...

  9. php函数搜集

    数组去重: 方法1:php自带此功能的函数array_unique($arr) 方法2:$arr = array_flip(array_flip($arr)); //这样便可以删除重复元素. 比上面的 ...

  10. ios 开发证书 appids 描述文件关系

    当你准备进行真机测试或者发布应用到App Store上去的时候, 免不了要申请相应的证书.(Development--测试证书. Distribution--发布证书) 进入证书管理相应网站https ...