![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
Dmenghu
这个作者很懒,什么都没留下…
展开
-
Digital Roots
一个数的“魔幻数字”是指它所有位数上的数之和,如果“魔幻数字”仅有一位,则被称为这个数的“究极魔幻数字”,如果“魔幻数字”有两位及两位以上,则需重复寻找“魔幻数字”的步骤,直到找到“究极魔幻数字”。 例如,对于一个正整数128,它的“魔幻数字”为11,但11有两位,所以重复之前的步骤,得到11的“魔幻数字”为2,2仅有一位数,则2是我们需要的“究极魔幻数字”。 Input 多组输入数据,...原创 2018-08-21 15:07:27 · 304 阅读 · 0 评论 -
POJ - 2406 Power Strings(字符串周期)
Given two strings a and b we define a*b to be their concatenation. For example, if a = “abc” and b = “def” then a*b = “abcdef”. If we think of concatenation as multiplication, exponentiation by a non-...原创 2018-08-28 11:12:27 · 193 阅读 · 0 评论 -
HDU - 1019 Least Common Multiple
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105. Input In...原创 2018-08-23 15:33:08 · 263 阅读 · 0 评论