Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("no_pals.in");
- ofstream fout("no_pals.out");
- int main()
- {
- int n,i;
- long long p=1,nr=9;
- fin>>n;
- fout<<"0"<<'\n';
- for(i=2;i<=n;i++){
- p*=10;
- if(i%2==1)nr*=10;
- p = p %666013;
- nr = nr %666013;
- fout<<(p*9-nr+666013)%666013<<'\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement