Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int putere_log(int x,int a)
- {
- int s=1;
- while(a)
- {
- if(a&1)
- s=1LL*s*x%666013;
- a/=2;
- x=1LL*x*x%666013;
- }
- return s;
- }
- int main()
- {
- int n,x,y;
- ifstream f("no_pals.in");
- f>>n;
- f.close();
- ofstream g("no_pals.out");
- for(int i=1;i<=n;++i)
- {
- x=(1LL*9*putere_log(10,i-1))%666013;
- y=(1LL*9*putere_log(10,i/2-(i%2==0)))%666013;
- g<<(x-y+666013)%666013<<'\n';
- }
- g.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement