← All problemsSign in

Even vs Odd Divisors

CodeChefRating 642Open on judge ↗

Given an integer $N$, let - $f(N)$ denote the number of even divisors of $N$ - $g(N)$ denote the number of odd divisors of $N$. For example, the divisors of $6$ are $1, 2, 3$ and $6$. $f(N) = 2, g(N) = 2$ as there are $2$ even and $2$ odd numbers in this list;. Find whether $f(N) > g(N)$ or $f(N) = g(N)$ or $f(N) < g(N)$. Output - $1$ if $f(N) > g(N)$ - $0$ if $f(N) = g(N)$ - $-1$ if $f(N)

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start