-
2005-12-24
玩一下google编程挑战赛试题
题在这里:
http://blog.donews.com/wysuperfly/archive/2005/12/22/667661.aspx
简单说就是:一个表示为I.F(L)*的有理数,如何转换成分数.
三部分:
1.处理输入字符串,找出循环小数的循环部分和前缀. 1.234(56), 1.23是前缀,(56)是循环部分. I.F(L)*,I.F是前缀,L是循环部分.
2.转换成分数.对前缀,分子用前缀串,分母用10的N次方,N是前缀的小数部分.对循环部分,分子是循环串,分母是10的M次方-1,M是循环串长度.用正则表式法会更清楚,不过太长,不写了.其实就是:
IF / (10^(length_of(F))) + L / (10 ^ (length_of(L)) - 1)
3.加和,用中国最大公约数算法约分.
-
"Finding Nemo" is a prediction of google, here are the evidences:
<寻找Nemo>是google的预言和号角,证据如下:
1.Finding Nemo means Search for someone even without a name.
1.寻找Nemo就是说搜索一个连名字都没有的人.
2. You are Marlin, always think you are making the "right" decision.
你就是Nemo爸爸,总以为自己做了"正确"的决定.
3. Dorey is the search input box: even with short-term memory lose, always lucky enough to bring you to the right place.
Dorey(小蓝鱼)是搜索引擎的输入框:没记性,但总能很幸运的带你到正确的地方去.
4. Bruce is the search engine, scary shark and brings the most useful information - the mask to you by accident."Fish are friends, not food" == "not to be evil"
大鲨鱼是搜索引擎.意外的帮你找到最有用的信息."鱼是朋友,不是食物"就是说"不作恶"
5. Those mocking fishes are google image search (octopus guess), google local search (Sydney) and google map (EAC).
那些搞笑的鱼群是:google图象搜索(猜章鱼),google本地搜索(悉尼)和google地图(东澳洲洋流)
6. Crush is your computer, it's 150 years old.Squirt is your cellphone / PDA / ipod.
大海龟是你的计算机,150岁了.小海龟是你的手机 / PDA / ipod
7. How's your story propagate? Mouth-to-ear, so you got a gmail account.
故事传播途径?gmail一样的口耳相传.
8. From where the fishes in tank came from: Pet store, mail order, ebay, and the "ocean". See the trend?
鱼缸里的鱼怎么来的?宠物店,邮购,ebay,来自"大海".看到趋势了?
9. Gil: All drains lead to the ocean. Or rather, All data lead to Google?
Gil(黑鱼):所有的下水道都通向大海.或者,所有数据都通向Google?
10. Nemo: Tell all the fish to swim down together!Power of the grassroots?
Nemo:让所有的鱼都一起往下游!草根的力量?







