#include <bits/stdc++.h>   long long z;   int l, r, i, j, k, ans;   short p;   std::vector<short> prm;   std::vector<int> to;   short dp[3000111];   bool done[3000111];   void dfs(long long now, char cnt) {     to.push_back(now);     for (; cnt < prm.size() && now * prm[cnt] <= r; ++cnt)       dfs(now * prm[cnt], cnt);   }   int main() {     prm.reserve(29);     to.reserve(3000111);     scanf( %d %d %hd , &l, &r, &p);     for (i = 2; i < p; ++i) {       for (j = 2; j * j <= i; ++j)         if (i % j == 0) break;       if (j * j > i) prm.push_back(i);     }     dfs(1, 0);     std::sort(to.begin(), to.end());     memset(dp, 0x3f, sizeof(dp));     dp[0] = 0;     for (i = 2; i < p; ++i)       for (j = 0, k = 1; j < to.size(); ++j) {         for (z = to[j] * i; k < to.size() && to[k] < z; ++k)           ;         if (to[k] == z && dp[k] > dp[j] + 1) {           dp[k] = dp[j] + 1;           if (i + dp[k] <= p) done[k] = true;         }       }     r = std::min(r, to.back());     for (i = 0; i < to.size() && to[i] < l; ++i)       ;     for (; i < to.size() && to[i] <= r; ++i)       if (done[i]) ++ans;     printf( %d n , ans);     return 0;   }   