Advertisement
Sunt_tare

Untitled

Nov 13th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. ifstream fin("no_pals.in");
  5. ofstream fout("no_pals.out");
  6. int main()
  7. {
  8.     int n,i;
  9.     long long p=1,nr=9;
  10.     fin>>n;
  11.     fout<<"0"<<'\n';
  12.     for(i=2;i<=n;i++){
  13.         p*=10;
  14.         if(i%2==1)nr*=10;
  15.         p = p %666013;
  16.         nr = nr %666013;
  17.         fout<<(p*9-nr+666013)%666013<<'\n';
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement