http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29201 Accepted Submission(s): 14148 Problem Description There are another kind…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 70782 Accepted Submission(s): 32417 Problem Description There are another ki…
#include<iostream> using namespace std; int main() { int n; while(cin>>n) { if((n+1)%4==3) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; } There are another kind of Fibonacci numbers: F(0) =…
Fibonacci Again Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 66450 Accepted Submission(s): 30760 Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n)…
同余问题 基本定理: 若a,b,c,d是整数,m是正整数, a = b(mod m), c = d(mod m) a+c = b+c(mod m) ac = bc(mod m) ax+cy = bx+dy(mod m) -同余式可以相加 ac = bd(mod m) -同余式可以相乘 a^n = b^n(mod m) f(a) = f(b)(mod m) if a = b(mod m) and d|m then a = b(mod d) eg: 320 = 20(mod 100) and d =…