Untitled
unknown
c_cpp
2 years ago
370 B
8
Indexable
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
int a;
cin >> a;
int chet = 0;
int nechet = 0;
for (int i = 1; i < a; i+=2)
{
if (a % i == 0) {
nechet += 1;
}
}
for (int i = 2; i < a; i += 2)
{
if (a % i == 0) {
chet += 1;
}
}
cout << chet << " " << nechet;
}Editor is loading...