题目
Number Sequence
Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)
Total Submission(s):8030 Accepted Submission(s):1482
Problem Description
A number sequence is defined as follows:
f(1) = 1,f(2) = 1,f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A,B,and n,you are to calculate the value of f(n).
Input
The input consists of multiple test cases.Each test case contains 3 integers A,B and n on a single line (1
Time Limit:2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)
Total Submission(s):8030 Accepted Submission(s):1482
Problem Description
A number sequence is defined as follows:
f(1) = 1,f(2) = 1,f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A,B,and n,you are to calculate the value of f(n).
Input
The input consists of multiple test cases.Each test case contains 3 integers A,B and n on a single line (1
提问时间:2020-07-24
答案
计算有时间限制 2000/1000 毫秒
1
1
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点
- 1在动物分类中,哪些动物是属于圆口类的?
- 2按要求修改A、B、C三处语句.A.每当站在祖国的地图前,使我油然而生无尽的遐想:祖国需要我们学好
- 3after a while it made a light sound turned off its lights 英语翻译
- 4怎么,难道我不像么?什么句 设问 疑问 还是反问
- 5已知a,b,c,d都是实数,求证:(a2+b2)(c2+d2)≥(ac+bd)2.
- 6and orders have been given at the box-office that it must never be sold
- 7The cat is the only one of her pets shewill have______on her bed.
- 8求看完《生化危机》1-4部后的观后感!要英语的,80个词就OK.
- 9The temptation of the perfect dance请给翻译一下
- 10妈妈要给远方的阿姨邮寄东西,分别装在3个同样的盒子里,每个盒子的长、宽、高分别是4分米、3分米、2分米