Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
370 B
0
Indexable
Never
#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;
}