链接:https://ac.nowcoder.com/acm/contest/338/C
来源:牛客网
Input
Only one integer k.
Output
Only one integer as the result which is equal to F[k+1]*F[k+1]-F[k]*F[k+2].
0 < k ≤ 1^18
If necessary, please use %I64d instead of %lld when you use "scanf", or just use "cin" to get the cases.
The online judge of HNU has the above feature, thank you for your cooperation.
找规律 -1 1
#include<stdio.h> #include<iostream> using namespace std; int main() { unsigned long long int n; cin >> n; if(n&1) cout<<"-1"<<"\n"; else cout<<"1"<<"\n"; }
原文:https://www.cnblogs.com/DWVictor/p/10229982.html