Untitled

mail@pastecode.io avatar
unknown
c_cpp
6 months ago
326 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int x;
    cin >> x;
    int count = 0;
    for (int i = 1; i <= sqrt(x); i++) {
        if (x % i == 0) {
            count++;
            if (i != x / i) {
                count++;
            }
        }
    }
    cout << count;
}
Leave a Comment