早教吧作业答案频道 -->英语-->
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...的网友还看了以下:
提先谢谢了,越快越好1.求下列函数的值:(1)已知f(x)=|x-2|分之x+1,求f(0),f( 2020-04-27 …
,;定义在正整数集f(x)对任意m,n,都有f(m+n)=f(m)+f(n)+4(m+n)-2,且 2020-05-13 …
数列叠加法问题回答的详细点必有重谢!(1)当数列的递推公式可以化为an+1-an=f(n)时,取n 2020-05-14 …
已知函数f(x)满足f(1)=a且f(n+1)=﹛(f(n)-1)/f(n)f(n)>1﹛2f(n 2020-06-12 …
正整数可以分为两个互不相交的正整数子集:{f(1),f(2),f(3)...f(n)...};{g 2020-07-20 …
1.设f(n)>0(n∈N*),f(2)=4,并且对于任意n1,n2∈N*,f(n1+n2)=f( 2020-07-22 …
设f(x)是一个n次多项式,若当k=0,1,...,n时有f(k)=k/(k+1),求f(n+1) 2020-08-02 …
我们可以通过计算求得:1+2+3+...+n=n*(n+1)除以2,其中n是正整数,现在我们来研究一 2020-12-04 …
f(n)=sin^na+cos^na,(n次方),试用f(n-1),f(n)和f(1)表示f(n+1 2020-12-07 …
f(x+1)=-f(1-x)变换:把f(x)往右平移一个单位所以原来的等式变成了f(x)=-f(x+ 2021-01-07 …