早教吧作业答案频道 -->英语-->
ThereareanotherkindofFibonaccinumbers:F(0)=7,F(1)=11,F(n)=F(n-1)+F(n-2)(n>=2)InputInputconsistsofasequenceoflines,eachcontaininganintegern.(n<1,000,000)OutputPrinttheword"yes"if3divideevenlyintoF(n).Printtheword
题目详情
There are another kind of Fibonacci numbers:F(0) = 7,F(1) = 11,F(n) = F(n-1) + F(n-2) (n>=2)
Input
Input consists of a sequence of lines,each containing an integer n.(n < 1,000,000)
Output
Print the word "yes" if 3 divide evenly into F(n).
Print the word "no" if not.
Sample Input
0
1
2
3
4
5
Sample Output
no
no
yes
no
no
no
怎么才能让输入的字符排成一列
Input
Input consists of a sequence of lines,each containing an integer n.(n < 1,000,000)
Output
Print the word "yes" if 3 divide evenly into F(n).
Print the word "no" if not.
Sample Input
0
1
2
3
4
5
Sample Output
no
no
yes
no
no
no
怎么才能让输入的字符排成一列
▼优质解答
答案和解析
要变成列,加回车的代码即可
看了Thereareanother...的网友还看了以下:
∑(2^n)/(n^n)的收敛性你回答的是:取后一项后前一项的比.(2^n+1)/((n+1)^(n 2020-03-31 …
求数列0,1,1,2,2,3,3,4,4.的前n项和S当n是奇数时.S=2*{[(n-1)/2]* 2020-04-09 …
2^2-1^2=2*1+13^2-2^2=2*2+14^2-3^2=2*3+1……(n+1)^2- 2020-05-19 …
求此极限,n趋于无穷,limln(1+1/n)^2+(1+2/n)^2+(1+n/n)^2liml 2020-06-14 …
已知数列{an}的通项公式为an=2^(n-1)+1则a1Cn^0+a2Cn^1+a3Cn^2+. 2020-07-09 …
设集合Pn={1,2,...,n},n∈N*,记f(n)为同时满足下列条件的集合A的个数1、A⊆P 2020-07-20 …
已知Fibonacci数列定义如下:F(1)=1F(2)=1F(n)=f(n-1)+f(n-2)( 2020-07-23 …
已知Fibonacci数列定义如下:F(1)=1F(2)=1F(n)=f(n-1)+f(n-2)( 2020-07-23 …
求教一个数学合情推理的问题通过计算可得下列等式2^2-1^2=2*1+13^2-2^2=2*2+14 2020-11-21 …
我们可以通过计算求得:1+2+3+...+n=n*(n+1)除以2,其中n是正整数,现在我们来研究一 2020-12-04 …