Birthday Gift
Practice
5 (1 votes)
Basic math
Math
Algorithms
Problem
84% Success 501 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Bob's friend's birthday is about to come and so he decided to buy his friend a gift and give it to him on his birthday. But he doesn't have enough money and hence thought that he should save money. Currently he has \(X\) rupees. He wants \(Y\) rupees for the gift. But there are only \(Z\) days left for his friend's birthday (\((Z + 1) ^ {th}\) day is his birthday). Starting from today, he can save \(i\) rupee(s) on the \(i^{th}\) day (\(1\) rupee on the first day, \(2\) rupees on the second day and so on) .Determine if he could save enough money so that he could buy a gift for his friend before his birthday.

Input Format

Each test contains multiple test cases. The first line of each test contains the number of test cases \(T\). The description of test cases is given below:

The first and the only line of each test case contains three integers \(X, Y, Z\).

Output Format

Print \(YES\) if Bob can buy the gift, otherwise print \(NO\).

Constraints

\(1 \le T \le 1000 \)

\(0 \le X, Y, Z \le 10^5 \)

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:10
5 votes
Tags:
Math BasicAlgorithmsBasic MathMath
Points:10
29 votes
Tags:
Very-Easy
Points:10
4 votes
Tags:
Very-Easy