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