Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define ll long long
- #include <bits/stdc++.h>
- using namespace std;
- vector<ll> divs(1e6+1, 1);
- int main() {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- for(ll i=2; i<=1e6; i++) {
- for(ll m=i; m<=1e6; m+=i) {
- divs[m]++;
- }
- }
- ll q, x_i, n_num = 0;
- vector<ll> xs;
- cin >> q;
- for(ll i=0; i<q; i++) {
- cin >> x_i;
- xs.push_back(x_i);
- }
- for(auto& x_i: xs) {
- cout << divs[x_i] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement