← All problemsSign in

Problem 6

Young Andrew has just learned about quadratic equations. He was quite amazed by the fact that their solutions could look like (5+sqrt(3))/4, so he wants to dig into this issue. More specifically, given five numbers x, y, d, z and k, he wants to find the number of equations a*t2+b*t+c=0, such that (x+y*sqrt(d))/z is a solution of the equation(i.e., when substituting it for t the equation holds.

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