
数论
philophobia
这个作者很懒,什么都没留下…
展开
-
A - Drazil and His Happy Friends
Drazil has many friends. Some of them are happy and some of them are unhappy. Drazil wants to make all his friends become happy. So he invented the following plan.There are n boys and m girls among his原创 2017-08-16 10:04:43 · 292 阅读 · 0 评论 -
F - Plant (快速幂)
Dwarfs have planted a very interesting plant, which is a triangle directed "upwards". This plant has an amusing feature. After one year a triangle plant directed "upwards" divides into four triangle pl原创 2017-08-16 15:30:33 · 299 阅读 · 0 评论 -
D - Dima and Lisa
Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them to represent the given number as the sum of at most than three prim原创 2017-08-16 15:35:13 · 318 阅读 · 0 评论 -
I - Modified GCD (最大公约数,打表)
Well, here is another math class task. In mathematics, GCD is the greatest common divisor, and it's an easy task to calculate the GCD between two positive integers.A common divisor for two positive num原创 2017-08-16 20:08:41 · 500 阅读 · 0 评论 -
L - The Euler function (欧拉筛)
The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has a lot of beautiful ch原创 2017-08-17 15:17:14 · 389 阅读 · 0 评论 -
B - Soldier and Number Game
Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the second soldier. Then the second one tries to make maximum possible number of rounds. Eac原创 2017-08-17 19:06:30 · 480 阅读 · 0 评论 -
H - Primes or Palindromes?
Rikhail Mubinchik believes that the current definition of prime numbers is obsolete as they are too complex and unpredictable. A palindromic number is another matter. It is aesthetically pleasing, and原创 2017-08-17 21:03:31 · 303 阅读 · 0 评论 -
P - 青蛙的约会
两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只乐观的青蛙,你原创 2017-08-18 16:22:18 · 252 阅读 · 0 评论