摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Revenge of GCD In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or grea 阅读全文
摘要:
本原串 由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串? 答案mod2008. 例如,100100不是本原串,因为他是由两个100组成,而1101是本原串。 Input 本原串 由0和1组成的串中,不能表示为由几个相同的较 阅读全文