Chef and Water Bottles Solution
Codechef Starters - 30
Problem Code : CHEFBOTTLE
Solution :
#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
using namespace std;
void solve()
{
ll n, x, k;
cin >> n >> x >> k;
if (n * x <= k)
{
cout << n << "\n";
}
else
{
cout << k / x << "\n";
}
}
int main()
{
ll t;
cin >> t;
while (t--)
{
solve();
}
}
Comments
Post a Comment