随笔分类 -  数论

摘要:Palindromic Number A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a 阅读全文
posted @ 2019-01-23 21:39 suvvm 阅读(325) 评论(0) 推荐(0)
摘要:Ignatius and the Princess IV "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, a 阅读全文
posted @ 2018-12-07 15:18 suvvm 阅读(171) 评论(0) 推荐(0)
摘要:Maximum Sum of Digits You are given a positive integer n. Let S(x)S(x) be sum of digits in base 10 representation of xx , for example, S(123)=1+2+3=6S 阅读全文
posted @ 2018-12-02 19:43 suvvm 阅读(439) 评论(0) 推荐(0)
摘要:Cure Given an integer nn, we only want to know the sum of 1/k21/k2 where kk from 11 to nn. Input There are multiple cases. For each test case, there i 阅读全文
posted @ 2018-11-28 20:32 suvvm 阅读(229) 评论(0) 推荐(0)
摘要:Little Boxes Little boxes on the hillside. Little boxes made of ticky-tacky. Little boxes. Little boxes. Little boxes all the same. There are a green 阅读全文
posted @ 2018-11-28 19:46 suvvm 阅读(285) 评论(0) 推荐(0)
摘要:大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把 阅读全文
posted @ 2018-11-23 15:07 suvvm 阅读(441) 评论(0) 推荐(0)
摘要:Eddy's AC难题 Eddy是个ACMer,他不仅喜欢做ACM题,而且对于Ranklist中每个人的ac数量也有一定的研究,他在无聊时经常在纸上把Ranklist上每个人的ac题目的数量摘录下来,然后从中选择一部分人(或者全部)按照ac的数量分成两组进行比较,他想使第一组中的最小ac数大于第二组 阅读全文
posted @ 2018-11-23 14:30 suvvm 阅读(251) 评论(0) 推荐(0)
摘要:M斐波那契数列 M斐波那契数列F[n]是一种整数数列,它的定义如下: F[0] = a F[1] = b F[n] = F[n-1] * F[n-2] ( n > 1 ) 现在给出a, b, n,你能求出F[n]的值吗? Input 输入包含多组测试数据; 每组数据占一行,包含3个整数a, b, n 阅读全文
posted @ 2018-11-22 23:35 suvvm 阅读(434) 评论(0) 推荐(0)
摘要:Jzzhu and Sequences Jzzhu has invented a kind of sequences, they meet the following property: You are given x and y, please calculate fn modulo 100000 阅读全文
posted @ 2018-11-22 21:53 suvvm 阅读(338) 评论(0) 推荐(0)
摘要:Revenge of GCD In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or grea 阅读全文
posted @ 2018-11-22 20:16 suvvm 阅读(270) 评论(0) 推荐(0)
摘要:本原串 由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串? 答案mod2008. 例如,100100不是本原串,因为他是由两个100组成,而1101是本原串。 Input 本原串 由0和1组成的串中,不能表示为由几个相同的较 阅读全文
posted @ 2018-11-22 00:34 suvvm 阅读(281) 评论(0) 推荐(0)
摘要:Large Division Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer  阅读全文
posted @ 2018-11-19 21:46 suvvm 阅读(289) 评论(0) 推荐(0)