摘要:
Missing some chairsProblem code: MCHAIRSSubmitMy SubmissionsAll SubmissionsRead problems statements in Mandarin Chinese and Russian.A new school in Byteland is now in the process of renewing some classrooms with new, stronger and better chairs, so that the students can stay still and pay attention t 阅读全文
posted @ 2013-11-01 22:59
HaibaraAi
阅读(108)
评论(0)
推荐(0)
摘要:
Uncle JohnyProblem code: JOHNYSubmitMy SubmissionsAll SubmissionsRead problems statements in Mandarin Chinese and Russian.Vlad enjoys listening to music. He lives in Sam's Town. A few days ago he had a birthday, so his parents gave him a gift: MP3-player! Vlad was the happiest man in the world! 阅读全文
posted @ 2013-11-01 22:51
HaibaraAi
阅读(483)
评论(0)
推荐(0)
摘要:
哎,等下次再做20题纪念一下!尼玛,根本做不出来,还要到处翻别人的555555555555 阅读全文
posted @ 2013-11-01 16:12
HaibaraAi
阅读(130)
评论(0)
推荐(0)
摘要:
109. Magic of David Copperfield IItime limit per test: 0.5 sec. memory limit per test: 4096 KBThe well-known magician David Copperfield loves lo show the following trick: a square with N rows and N columns of different pictures appears on a TV screen, Let us number all the pictures in the following 阅读全文
posted @ 2013-11-01 16:10
HaibaraAi
阅读(102)
评论(0)
推荐(0)
摘要:
108. Self-numbers 2time limit per test: 1 sec. memory limit per test: 4096 KBIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d stands for digitadition, a term coine 阅读全文
posted @ 2013-11-01 13:20
HaibaraAi
阅读(107)
评论(0)
推荐(0)
摘要:
107. 987654321 problemtime limit per test: 0.5 sec. memory limit per test: 4096 KBFor given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 987654321.InputInput contains integer number N (1 3 #include 4 #include 5 #include 6 #include 7 #incl... 阅读全文
posted @ 2013-11-01 07:42
HaibaraAi
阅读(162)
评论(0)
推荐(0)
摘要:
106. The equationtime limit per test: 0.5 sec. memory limit per test: 4096 KB 对于等式ax+by=c,a,b,c皆为整数,c如果是gcd(a, b)的倍数,则方程有解,否则方程无解。(定理1)因为等式ax+by=gcd(a, b)必定有解(定理1),所以可以解出来,解法如下: 因为gcd(a, b) = gcd(b, a % b),所以有bx1+(a%b)y1=gcd(a,b),注意!此时x1并不等于x,y1也不等于y!这个过程可以循环(就想求最大公约数一样),将b视为新的a',a%b视为新的b',可 阅读全文
posted @ 2013-11-01 00:15
HaibaraAi
阅读(151)
评论(0)
推荐(0)
浙公网安备 33010602011771号