DOUGHNUT - Harry and big doughnuts

Young Harry was asked to buy some foodstuffs for his neighbour – a strange old lady who lived with a bunch of fat cats. But the cats were strange too and they ate only doughnuts. So the lady wanted Harry to bring exactly one doughnut for each of her cats – and she had c of them. Harry had a rucksack with him but as he was a little boy he could carry only k kilograms. Harry knew that each doughnut weights w kilograms (big cats, big doughnuts). Help him decide whether he should go to supermarket and buy the doughnuts or just give up and dream he could do some magic...

Input

There is a single positive integer t (t <= 100) on the first line of input which corresponds to the number of tests (Harry was asked to buy doughnuts few times). Then t lines follow, each containing three numbers: c, k and w (1 <= c, k, w <= 100).

t [number of tests]
c k w [number of cats, Harry's hoisting capacity and weight of doughnut]
c k w [next test case]
...

Output

t lines containing word “yes” if Harry is capable of handling the task or “no” if doughnuts would cause his spine crack.

Example

Input:
3
5 15 3
1 5 4
13 25 2

Output:
yes
yes
no


Added by:wiele
Date:2009-03-26
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2015-07-29 16:35:33
careful if k=0 guys
2015-06-29 20:33:46
whats wrong in my code? I get runtime error NZEC

import java.util.*;
import java.lang.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

class Main
{
public static void main (String[] args) throws java.lang.Exception
{

java.io.BufferedReader inp = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
int t= Integer.parseInt(inp.readLine());
System.out.println(t);
int c= Integer.parseInt(inp.readLine());
System.out.print(c + " ");
int k= Integer.parseInt(inp.readLine());
System.out.print(k + " ");
int w= Integer.parseInt(inp.readLine());
System.out.print(w);

if(c * w < k)
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}

}
}
2015-06-22 00:19:03 Sujit Kumar Kisku
Why the result is 'wrong answer'? I have checked and run my program and its giving same answer as it is in the problem.
2015-06-22 00:17:56 Sujit Kumar Kisku
Why the result is 'wrong answer'? I have checked and run my program and its giving same answer as it is in the problem.
2015-06-22 00:16:55 Sujit Kumar Kisku
Why the result is 'wrong answer'? I have checked and run my program and its giving same answer as it is in the problem.
2015-04-22 16:26:19
When I run my java code using NetBeans to solve this problem, I've got my code works well, giving same output as this task output. But, when i submit my code in this page, it said Wrong Answer T_T. What's wrong man ?
2015-04-22 15:56:42
I can't understand this problem
2014-12-06 18:51:15 aditya singh
how to solve this???
2014-11-02 14:17:17 headfirstcoder
My subbmission is: 12794762 (CodeMesh)
2014-10-29 09:53:42 Ali Yusuf
It's obviously a good problem for beginners to inspire..
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.