Find Me Roots
Practice
4.3 (3 votes)
Implementation
Mathematics
Easy Medium
Very easy
Problem
20% Success 8151 Attempts 30 Points 5s Time Limit 256MB Memory 1024 KB Max Code

Bosky needs your help in completing his maths homework today. He has to solve some questions as homework from a book named Jungly Mathematics. He knows that Jungly Mathematics contains certain quadratic equations which have imaginary roots. He is not yet introduced to the concept of imaginary roots and is only concerned with the questions having real roots. The book contains N quadratic equation of the form \(a[i]x^2 + b[i]x + c[i] = 0\) where \(a[i] != 0\) and i represents the index of the question.

You have to make a program which will take N, a, b and c as input and tell him how many questions he can solve out of those N questions (i.e. You have to find how many quadratic equations in the book have real roots).

Input

Input will contain a number N denoting the number of quadratic equations.

N line follow, each one consisting of three space separated integers \(a[i]\), \(b[i]\) and \(c[i]\) representing the quadratic equation \(a[i]x^2 + b[i]x + c[i] = 0\). where \([0 <= i < N]\).

Output

Print a single integer denoting the number of quadratic equations Bosky can solve.

Constraints

\(1 \le N \le 100\)

\(-100 \le a[i] , b[i], c[i] \le 100\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
6 votes
Tags:
MathematicsMediumNumber Theory
Points:30
5 votes
Tags:
AlgorithmsApprovedDynamic ProgrammingMathMediumOpen
Points:30
191 votes
Tags:
MathematicsEasy-Medium