S Ramanujan
CodeChefOpen on judge ↗
Ramanujan, the great mathematician, recently discovered a very simple technique to find the roots any quadratic equation. As per Ramanujan, the discriminate (delta) of any equation in any degree plays an important role in determining the roots of that equation. In case of a quadratic equation with a positive discriminate, the roots are real. For example for equation: x^2 - 2*x +1, factors are
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