和很多oj一样都有的经典题目,就是求阶乘的尾零有多少个。
这就不能直接求阶乘的值。而是直接求5的倍数的个数就可以了。
这个网站的数据量很大,有100000个,所以这里使用buffer,调用fread函数,可以大大加速程序。
原题:
http://www.codechef.com/problems/FCTRL
#include
unsigned facZeros(unsig...
分类:
其他好文 时间:
2014-05-05 13:24:09
阅读次数:
361
如何使用html网页和本地app进行传递数据呢?经过研究,发现还是有方法的,总结了一下,大致有一下几种方式
一、通过html页面打开Android本地的app
1、首先在编写一个简单的html页面
html>
head>
meta http-equiv="Content-Type" content="text/html; ch...
分类:
移动开发 时间:
2014-05-04 00:31:46
阅读次数:
376
typename与class都可以用作模板形参定义的关键字,两者无异~~
可是,typename的用途并非仅限于此,如下面的代码:
{CSDN:CODE:323655}
在上述代码中,iter的类型是C::const_iterator,实际的类型取决于C的类型。const_iterator 同时也是C内部的typedef 类型名。 但是,在此处,编译器的行为不会是你预期的...
分类:
编程语言 时间:
2014-05-04 00:19:35
阅读次数:
330
今天我们要学习的内容是如何利用Python生成一个随机的中文验证码,并将图片保存为.jpeg格式。
在这之前,你首先得了解Python中的PIL库。PIL是Python Imaging Library的简称,PIL是一个Python处理
图片的库,提供了一系列模块和方法,比如:裁切,平移,旋转,改变尺寸等等。在PIL库中,任何一个图像都是用
Image对象来表示的,所以要加载一张图片,...
分类:
其他好文 时间:
2014-05-03 17:07:06
阅读次数:
364
SICP 习题 1.36 要求我们修改fixed-point函数,使它能够打印出计算中产生的近似值序列,使用练习1.22展示的newline和display方法。而后通过找出变换x => log (1000)/log(x)的不动点的方式确定x^x=1000的一个根(书中还提示你使用Scheme的基本过程log,用于计算自然对数值)。然后比较一下使用平均阻尼和不用平均阻尼的计算步数。要注意的是不能使...
分类:
其他好文 时间:
2014-05-03 17:04:04
阅读次数:
288
Ubuntu 14.04下启动模拟设备Android 4.2.2的时候报错:failed to load libgl.so先用locate 命令定位libGL库, 然后添加一个链接即可:dean@dean-Aspire-V7-481G:~$ locate libGL
/opt/android-sdk-linux/tools/lib/libGLES_CM_translator.so
/opt/and...
分类:
其他好文 时间:
2014-05-03 16:17:54
阅读次数:
483
Chef wrote some text on a piece of paper and now he wants to know how many holes are in the text. What is a hole? If you think of the paper as the plane and a letter as a curve on the plane, then each...
分类:
其他好文 时间:
2014-05-03 15:49:18
阅读次数:
412
Python中怎么编写类
Last Edit 2013/5/2
先看一个例子:
#person.py
class person:
"""class to representaion a person"""
def __init__(self,name,age):
self.name=name
if 0<age<=150:
...
分类:
编程语言 时间:
2014-05-03 15:48:31
阅读次数:
390
TEX Quotes
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 8505
Accepted: 4460
Description
TEX is a typesetting language developed by Donald Knuth. It ta...
分类:
其他好文 时间:
2014-05-03 15:40:11
阅读次数:
296