Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <cmath>
- using namespace std;
- int main() {
- int x, k = 0;
- cin >> x;
- if (x == 1) {
- cout << 1;
- return 0;
- }
- int i = 2;
- for (i; i < sqrt(x); i++) {
- if (x % i == 0) {
- k++;
- }
- }
- if (i == sqrt(x)) {
- cout << (k * 2) + 3;
- }
- else
- cout << (k * 2) + 2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement