2014年5月29日

摘要: 今年参加阿里实习生线上笔试的时候有一道红烧狮子头的题目,当时觉得挺有意思的,今天在和师兄们聊天的时候跟他们说了这道题,然后就顺便把当时的思路写下来吧(ps:当时一个同学在这道题上帮了我很大的忙,给我提供了思路)。题目:小张非常喜欢阿里巴巴西溪园区2号餐厅的红烧狮子头,每次都在餐厅里寻找这个菜的窗口。... 阅读全文
posted @ 2014-05-29 22:26 楠哥1991 阅读(262) 评论(0) 推荐(0) 编辑

2014年5月28日

摘要: 最近苦逼项目需要用mfc做一个显示界面,其中有一个功能就是需要在editbox末尾追加一个cstringhttp://blog.sina.com.cn/s/blog_7176c8440100mbzt.html 中给出的做法如下: int nCount= 0;int nLastLine = 0;nC... 阅读全文
posted @ 2014-05-28 23:42 楠哥1991 阅读(229) 评论(0) 推荐(0) 编辑

2014年5月6日

摘要: Problem:Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.3710728753390210279879799822083759024651013574025046376... 阅读全文
posted @ 2014-05-06 23:26 楠哥1991 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Problem:The sequence of triangle numbers is generated by adding the natural numbers. So the 7thtriangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28... 阅读全文
posted @ 2014-05-06 21:58 楠哥1991 阅读(95) 评论(0) 推荐(0) 编辑

2014年5月5日

摘要: Problem:In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08... 阅读全文
posted @ 2014-05-05 22:09 楠哥1991 阅读(98) 评论(0) 推荐(0) 编辑

2014年4月24日

摘要: Question:好像是一道微软的面试题:已知两个1~30之间的数字,甲知道两数之和,乙知道两数之积。 甲问乙:"你知道是哪两个数吗?"乙说:"不知道"; 乙问甲:"你知道是哪两个数吗?"甲说:"也不知道"; 于是,乙说:"那我知道了"; 随后甲也说:"那我也知道了"; 这两个数是什么?思... 阅读全文
posted @ 2014-04-24 09:17 楠哥1991 阅读(139) 评论(0) 推荐(0) 编辑

2014年4月23日

摘要: Question:The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.tips:注意结果的值可能大于32位机器中long的表示范围!!!C Code... 阅读全文
posted @ 2014-04-23 19:54 楠哥1991 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Question:A Pythagorean triplet is a set of three natural numbers,abc, for which,a2+b2=c2For example, 32+ 42= 9 + 16 = 25 = 52.There exists exactly one... 阅读全文
posted @ 2014-04-23 19:52 楠哥1991 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Question:Find the greatest product of five consecutive digits in the 1000-digit number.731671765313306249192251196744265747423553491949349698352031277... 阅读全文
posted @ 2014-04-23 19:49 楠哥1991 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Question:By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.What is the 10 001st prime number?C Code:... 阅读全文
posted @ 2014-04-23 19:35 楠哥1991 阅读(99) 评论(0) 推荐(0) 编辑

导航