Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #define mod 777013
- using namespace std;
- int n,f1=1,f2=1;
- void fibo()
- {
- int sum;
- for (int i=1;i<=n;i++)
- {
- sum=(f1+f2)%mod;
- f1=f2;
- f2=sum;
- }
- cout<<f2-1;
- }
- int main()
- {
- cin>>n;
- fibo();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement