dinamica02 pbinfo code example
Example: dinamica02 pbinfo
#include <iostream>
using namespace std;
#define MOD 777013
int n;
long long s[2], nr;
int main()
{
cin >> n;
s[0] = 26; s[1] = 26 * 26;
for (int i = 3; i <= n; ++ i)
{
nr = (s[1] * 25 + s[0] * 25) % MOD;
s[0] = s[1];
s[1] = nr;
}
cout << nr;
return 0;
}