|
本帖最后由 tensaix2j 于 31-3-2011 11:46 PM 编辑
最近在玩codercharts, 发现一些题目蛮有趣的。。 以下这些都可以推理出一个formula 来应算,因为bruteforce算不了。
(跟projecteuler 有点类似但不像projecteuler 那种给个答案就可以了)
例如 :
给一个号码,x where x > 1000,000,000
求
x ! 转成hexadecimal 号码后一共会有几个trailing zeroes ?
例如说 1234567890! 的hexadecimal 会有几个trailling zeroes ?
你们会用什么formula ?
在来一题是,
给一个号码,x where x > 1,000,000
若x = T1 + T2 + T3 + .... Tn , Tn 跟 Tn+1 的差为 1,
求
T1 跟 Tn where n 是最长的。
你们会用什么formula ? |
|
|
|
|
|
|
|

楼主 |
发表于 31-3-2011 11:43 PM
|
显示全部楼层
本帖最后由 tensaix2j 于 31-3-2011 11:45 PM 编辑
答案迟点我会公布。  |
|
|
|
|
|
|
|
发表于 1-4-2011 12:01 PM
|
显示全部楼层
tensaix2j 哥好久没来这里了
这是不是要用到de Polignac's formula之类的?
PS:详圣哥,进来下。计算机是你的强项,你用C++来run看看 |
|
|
|
|
|
|
|

楼主 |
发表于 1-4-2011 12:20 PM
|
显示全部楼层
tensaix2j 哥好久没来这里了
这是不是要用到de Polignac's formula之类的?
PS:详圣哥,进来下。计算 ...
鸭王之王 发表于 1-4-2011 12:01 PM 
你又开新帐号啦?  |
|
|
|
|
|
|
|
发表于 1-4-2011 02:02 PM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 1-4-2011 11:23 PM
|
显示全部楼层
不管新旧,都是虚名。
回题目,是不是有关那个我说的formula呢?
请指教,我新人来的
鸭王之王 发表于 1-4-2011 02:02 PM 
不是很清楚de Polignac,但我的解决方法跟prime number没太大的关系,
不过跟 二进制 还有 十六进制 的数目有关系。 我是从那边着手的。 |
|
|
|
|
|
|
|

楼主 |
发表于 1-4-2011 11:33 PM
|
显示全部楼层
解决了楼上两题之后,
接下来一题, 我本人也还没解决的。。
有 500 个随机号码[1,10000000] 要丢进两个箱子, 条件是第二个箱必须要是第一个箱子的总数的265倍。
要怎么个选那些号码可以比较不用那么多计算。。。。 |
|
|
|
|
|
|
|
发表于 4-4-2011 10:34 PM
|
显示全部楼层
回复 3# 鸭王之王
你assume 我计算机强了,而且assume 我会 C++ 
回复 7# tensaix2j
什么意思呢?抽了过后可以选择放那一个箱子? Exactly 256? |
|
|
|
|
|
|
|

楼主 |
发表于 6-4-2011 12:31 AM
|
显示全部楼层
回复 鸭王之王
什么意思呢 ...
详圣 发表于 4-4-2011 10:34 PM 
第二个箱子的sum 是第一个箱子的sum 的265 倍。
不是exact,但至少要很接近,越接近越高分。 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|