Untitled

 avatar
unknown
c_cpp
2 years ago
326 B
3
Indexable
#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;
}
Editor is loading...
Leave a Comment