← All problemsSign in

Simple Differential

Sam is a maths geek and likes to play with polynomials. He chooses a polynomial of the form $a_1x^n+a_2x^{n-2}+...+a_{n+1}$. For any value of $x$ he selects a number $m$ such that $m$ divides the polynomial completely. When it does not, Sam decided to differentiate it. If it still didn’t divide, he differentiated the polynomial again. He went on with the process $k$ times until $m$ successfully di

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