文件名称:fib
介绍说明--下载内容均来自于网络,请自行研究使用
定义:f0=f1=1, fn=fn-1+fn-2(n>=2)。{fi}称为Fibonacci数列。
输入n,求fn mod q。其中1<=q<=30000。
Input format:
第一行一个数T(1<=T<=10000)。
以下T行,每行两个数,n,q(n<=109, 1<=q<=30000)、
Output format:
文件包含T行,每行对应一个答案。
-Definition: f0 = f1 = 1, fn = fn-1+ Fn-2 (n> = 2). (fi) known as the Fibonacci series. Enter n, for fn mod q. In which 1 <= q <= 30000. Input format: the first line of a few T (1 <= T <= 10000). The following T lines, each line number 2, n, q (n <= 109, 1 <= q <= 30000), Output format: file contains the T line, each line corresponds to an answer.
输入n,求fn mod q。其中1<=q<=30000。
Input format:
第一行一个数T(1<=T<=10000)。
以下T行,每行两个数,n,q(n<=109, 1<=q<=30000)、
Output format:
文件包含T行,每行对应一个答案。
-Definition: f0 = f1 = 1, fn = fn-1+ Fn-2 (n> = 2). (fi) known as the Fibonacci series. Enter n, for fn mod q. In which 1 <= q <= 30000. Input format: the first line of a few T (1 <= T <= 10000). The following T lines, each line number 2, n, q (n <= 109, 1 <= q <= 30000), Output format: file contains the T line, each line corresponds to an answer.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
fib.pas