func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 100005;   long long b, q, l, m, a[N];   map<long long, int> vis;   int main() {     scanf( %lld%lld%lld%lld , &b, &q, &l, &m);     while (m--) {       long long x;       scanf( %lld , &x);       vis[x] = 1;     }     if (max(-b, b) > l) {       printf( 0 n );     } else if (b == 0) {       if (vis.count(b) == 0)         printf( inf n );       else         printf( 0 n );     } else {       if (q == 0) {         if (vis.count(0) == 0) {           printf( inf n );         } else {           printf( %d n , !vis.count(b));         }       } else if (q == 1) {         if (vis.count(b) == 0)           printf( inf n );         else           printf( 0 n );       } else if (q == -1) {         if (vis.count(b) == 0 || vis.count(-b) == 0)           printf( inf n );         else           printf( 0 n );       } else {         int ans = 0;         while (max(-b, b) <= l) {           if (vis.count(b) == 0) ans++;           b *= q;         }         printf( %d n , ans);       }     }     return 0;   }   