Just Like Mob!
The followers of Psycho-Helmet religion follow a peculiar calendar – a normal year contains $N$ days. Every $K$-th year is a “MOB” year. For example, if $K = 4$, then years $4, 8, 12, 16 \ldots$ are “MOB” years. A “MOB” year contains $M$ additional days i.e. it contains $N+M$ days. Given $X$, determine whether the day after $(X-1)$ days from Day $1$ of Year $1$ falls in a “MOB” year. ### Input
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.
Sign in to chat with the tutor and save your progress.
Sign in to start