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