Gold Mining
Problem Link: https://www.codechef.com/CU1PP0005/problems/CARRYGOLD
Problem: CARRYGOLD
Chef has decided to go to a gold mine along with NN of his friends (thus, total N+1N+1 people including Chef go to the gold mine).
The gold mine contains a total of XX kg of gold. Every person has the capacity of carrying up atmostatmost YY kg of gold.
Will Chef and his friends together be able to carry up all the gold from the gold mine assuming that they can go to the mine exactly once.
Solution:
#include <bits/stdc++.h>
using namespace std;
#define int long long int
void solve();
int32_t main() {
int t;
cin>>t;
while (t--)
{
solve();
}
return 0;
}
void solve(){
int x,y,z;
cin>>x>>y>>z;
int n=x+1;
int a=n*z;
if (a>=y)
{
cout<<"Yes"<<endl;
}else
{
cout<<"No"<<endl;
}
return ;
}