摘要: DescriptionTrung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 < N < 10000) . After that, he counts the number of times each digit (0 to 9) appears in the sequence. For example, with N = 13 , the 阅读全文
posted @ 2013-01-30 15:02 Joyee 阅读(568) 评论(1) 推荐(0) 编辑
摘要: Description You: What's the score? Did I miss much? Me: It's 2-1 for elAhli and the second half just started. The first half was quite boring. You: Who scored first? elAhli or ezZamalek? Me: What difference does it make? You: Big difference! I can predict the outcome of the match if I knew t 阅读全文
posted @ 2013-01-30 14:51 Joyee 阅读(505) 评论(0) 推荐(0) 编辑
摘要: DescriptionAn abundant number is a positive integer n for which Sigma(n) – 2n > 0, Where Sigma(n) is defined as the sum of all the divisors of n. And the quantity Sigma(n) – 2n is called abundance.Given the range of n, you should find out the maximum abundance value that can be reached. For examp 阅读全文
posted @ 2013-01-30 03:32 Joyee 阅读(356) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn sixth grade, students are presented with different ways to calculate the Least Common Multiple (LCM) and the Greatest Common Factor (GCF) of two integers. The LCM of two integers a and b is the smallest positive integer that is a multiple of both a and b . The GCF of two non-zero integ 阅读全文
posted @ 2013-01-30 03:19 Joyee 阅读(326) 评论(0) 推荐(0) 编辑