Project Euler 80

Problem 80 It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite without any repeating pattern at all. The square root of two is 1.41421356237309504880…, and the digital sum of the first one hundred decimal [...] (全文...)

Project Euler 99

Problem 99 Comparing two numbers written in index form like 2^11 and 3^7 is not difficult, as any calculator would confirm that 2^11 = 2048 < 3^7=2187. However, confirming that 632382^518061 > 519432^525806 would be much more difficult, as both numbers contain over three million digits. Using base_exp.txt(right click and ‘Save Link/Target As…’), a 22K [...] (全文...)

Project Euler 51

Problem 51 By replacing the 1st digit of *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten [...] (全文...)

老天给力,冷天

今天只能用冷来形容了,好冷好冷,其实也不是很冷,只是来得很突然,本想打电话回家问问的,叫爸妈注意保暖,不过后来给忘了,明天打吧。 上午去上课,做了一回乖乖仔,越长大越认为那些课上不上都无所谓,感觉老师在上面把你懂的东西讲一遍,根本没有探讨意味,不过课后也懒得问老师问题,下课闪得比老师还快,不懂的就请教师兄吧,或许他们理解比老师更直观些。 关于对数学分析的学习,我觉得看完课本,做完课本习题,做完吉米多维奇习题集,基本差不多了,没有太多必要的听课和看其他误人子弟的书籍,至少在理解上,吉米是帮了我不少的忙,郁闷时,做做吉米,会有非一般的收获的。 (全文...)

win 7下和Fedora下Matlab安装过程记录

matlab已经装好几次了,每次都有不同的错误,好吧,这次就记录下,今天也比较特殊,我在win7也装了,下面讲讲具体过程吧。声明这些都是参考网上的,并且在机子可行过,如果在你的机子不可行的话,要么是做错了什么,要么我的方法不适合你,不过有问题可以联系,也希望我可以帮上忙,联系方式见About Me。 (全文...)

难得的周末和几句不给力的吐槽

我在想我是该敲我大学以来的回忆呢,还是敲敲这个难得的周末呢,后来觉得那个回忆还是以后再写吧。 这个周末或许是很难得,因为以前没有,以后估计也不会有了。 (全文...)

《离散数学结构》第四章实验问题的代码实现

背景不仔细描述 问题源于《离散数学结构》(《离散数学结构》第五版,翻译版,高等教育出版社,【美】Robert C. Busby and Sharon Cutler Ross 著,罗平 译 )一书的Page 177的实验4的第三部分 由于这部分是老师要求的实验,不过这个问题的代码实现有点小小的难度,本来想放弃的,后来想到了算法,就开始敲咯,rp++,这次实验又是比较完美的解决了,因为实验很少人会交代码的,因为没有多少人会写,下面贴代码,不解释! (全文...)

Assert基本使用

转自cplusplus assert 1 void assert (int expression); (全文...)

Project Euler 100

Problem:project euler 100 If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21)(14/20) = 1/2. The next such arrangement, for which there is exactly 50% chance of [...] (全文...)

校ACM月赛结束,不过有些东西还没结束

还是写写今晚我和zhxfl负责今晚的校ACM月赛吧。 总的来说,我觉得这次月赛,我觉得我做得不够好,很多比赛临场遇到的问题可以在比赛前处理好就不会发生的,泪流,下面列举今晚的问题吧。 (全文...)