func_code_string: #include <bits/stdc++.h>   using namespace std;   long long int tree[6000005], a[3000005], minp[3000005], upd[3000005];   long long int cun[3000005];   long long int d[3000005];   long long int n;   void sieve() {     a[0] = 1;     a[1] = 1;     for (long long int i = 1; i < 1e6 + 1; i++) {       for (long long int j = i; j < 1e6 + 1; j += i) {         d[j]++;       }     }   }   long long int lazy[3000005], tree2[3000005];   long long int b[3000005];   void build_tree(long long int node, long long int c, long long int en) {     if (c > en) return;     if (c == en) {       tree[node] = b[c];       tree2[node] = (tree[node] != 2 && tree[node] != 1);       return;     }     build_tree(node * 2, c, (c + en) / 2);     build_tree(node * 2 + 1, 1 + (c + en) / 2, en);     tree[node] = tree[2 * node] + tree[2 * node + 1];     tree2[node] = tree2[node * 2] | tree2[node * 2 + 1];   }   long long int query(long long int node, long long int st, long long int en,                       long long int l, long long int r) {     if (st > r || en < l || st > en) return 0;     if (st >= l && en <= r) {       return tree[node];     }     long long int r1 = query(2 * node, st, (st + en) / 2, l, r);     long long int r2 = query(2 * node + 1, (st + en) / 2 + 1, en, l, r);     return r1 + r2;   }   void update(long long int node, long long int st, long long int en,               long long int l, long long int r) {     if (st > r || en < l || st > en) return;     if (st == en) {       int p = d[tree[node]];       tree[node] = p;       tree2[node] = (tree[node] != 2 && tree[node] != 1);       return;     }     if (tree2[2 * node]) update(2 * node, st, (st + en) / 2, l, r);     if (tree2[2 * node + 1]) update(2 * node + 1, (st + en) / 2 + 1, en, l, r);     tree[node] = tree[2 * node] + tree[2 * node + 1];     tree2[node] = tree2[node * 2] | tree2[node * 2 + 1];   }   int main() {     sieve();     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long int q;     cin >> n >> q;     for (long long int i = 0; i < n; i++) cin >> b[i];     build_tree(1, 0, n - 1);     for (long long int i = 0; i < q; i++) {       long long int ty, l, r;       cin >> ty >> l >> r;       l--;       r--;       if (ty == 1)         update(1, 0, n - 1, l, r);       else         cout << query(1, 0, n - 1, l, r) <<   n ;     }   }   