我们把只包含因子2、3和5的数称作丑数(Ugly
Number)。例如6、8都是丑数,但14不是,因为它包含因子7。
方法1 :
暴力破解,逐个判断
代码:
#include
#include
using namespace std;
//判断是否是丑数
bool isUgly(int index){
while(index % 2 == 0){
index /= 2...
分类:
其他好文 时间:
2014-08-04 21:30:58
阅读次数:
313
--利用sqlserver来运算斐波那契规律declare @number intdeclare @A intdeclare @B intdeclare @C intset @A=1set @B=2set @Number=3select @C=@A+@Bwhile(@Number0) goto er...
分类:
数据库 时间:
2014-08-04 21:23:58
阅读次数:
279
Given a digit string, return all possible letter combinations that the number could represent.
分类:
其他好文 时间:
2014-08-04 21:20:47
阅读次数:
257
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711题目大意:在母链中找到子链的位置,输出开始的位置。 1 #include 2 #include 3 using namespace std; 4 int lens,lenc,next[10000.....
分类:
其他好文 时间:
2014-08-04 21:17:57
阅读次数:
174
下载 git-1.8.2.tar.gztar -zvxf git-1.8.2.tar.gzcd git-1.8.2.2sudo make prefix=/usr/local/git allsudo make prefix=/usr/local/git installgit –version 查看版本...
分类:
其他好文 时间:
2014-08-04 21:12:07
阅读次数:
264
故障描述:中间层调用存储过程报错,到PL/SQL中对存储过程进行调试报以下错误ORA-06502: PL/SQL: numeric or value error: character to number conversion errorORA-06512: at "PROCESS_DRUG_SAME...
分类:
数据库 时间:
2014-08-04 20:36:38
阅读次数:
2547
下面教大家如何手工算出oracle执行计划中的cost值。
成本的计算方式如下:
Cost = (
#SRds * sreadtim +
#MRds * mreadtim +
CPUCycles / cpuspeed
) / sreadtime
#SRds - number of single block reads 单...
分类:
其他好文 时间:
2014-08-04 18:06:07
阅读次数:
310
SGU 407
407. Number of Paths in the Empire
Time limit per test: 0.75 second(s)
Memory limit: 65536 kilobytes
input: standard
output: standard
During the period of Tsam dynasty ruling...
分类:
编程语言 时间:
2014-08-04 17:46:17
阅读次数:
294
Google Mock启蒙篇 [1] (Google C++ Mocking Framework for Dummies 翻译)Google C++ Mocking Framework for DummiesGoogle Mock启蒙篇Version: 0.07作者:adrian alexander...
分类:
其他好文 时间:
2014-08-04 17:19:27
阅读次数:
485
这几天初学geoserver,试了一下发布shape数据,我不知道怎么设置发布哪种服务的地图。只是在发布以后的URl里,http://localhost:8080/geoserver/ynxzqh/wms?service=WMS&version=1.1.0,是不是URL这个表示发发布的...
分类:
其他好文 时间:
2014-08-04 14:49:47
阅读次数:
178