Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Eikooc loves bread. She has N loaves of bread, all of which expire after exactly M days. She can eat upto K loaves of bread in a day. Can she eat all the loaves of bread before they expire?
For each test case, output Yes
if it will be possible for Eikooc to eat all the loaves of bread before they expire. Otherwise output No
.
You may print each character of Yes
and No
in uppercase or lowercase (for example, yes
, yEs
, YES
will be considered identical).
Input: 3
100 100 1
9 2 5
19 6 3
Output: Yes
Yes
No
Test case 1: Eikooc can eat one loaf of bread per day for 100 days. Thus none of the bread expires.
Test case 2: Eikooc can eat 5 loaves of the first day and 4 loaves on the second day. Thus none of the bread expires.
Test case 3: There is no way Eikooc can consume all the loaves of bread before it expires.
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a<=b*c)
System.out.println("yes");
else
System.out.println("no");
}
}
}
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n, m, k;
cin>>n>>m>>k;
if((m*k)>=n){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
return 0;
}
t=int(input())
for i in range(t):
a,b,c=map(int,input().split())
if b*c>=a:
print("YES")
else:
print("NO")
In our experience, we suggest you solve this Expiring Bread CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Expiring Bread CodeChef Solution
I hope this Expiring Bread CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>