Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Akshat has X rupees to spend in the current month. His daily expenditure is Y rupees, i.e., he spends Y rupees each day.
Given that the current month has 30 days, find out if Akshat has enough money to meet his daily expenditures for this month.
For each test case, output YES
if Akshat has enough money to meet his daily expenditure for 3030 days of the month, 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
1000 10
250 50
1500 50
Output: YES
NO
YES
Test Case 1: Akshat has 1000 rupees and he wants to spend 30×10=300 rupees in the entire month. Therefore, he has enough money for the entire month.
Test Case 2: Akshat has 250 rupees and he wants to spend 30×50=1500 rupees in the entire month. Therefore, he does not have enough money for the entire month.
Test Case 3: Akshat has 1500 rupees and he wants to spend 30×50=1500 rupees in the entire month. Therefore, he has enough money for the entire month.
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();
for(int i=0;i<t;i++){
int x = sc.nextInt();
int y = sc.nextInt();
int z = y*30;
if(x>=z){
System.out.println("yes");
}else{
System.out.println("no");
}
}
}
}
#include <iostream>
using namespace std;
int main() {
int t;
std::cin >> t;
while(t>0){
int a,b;
std::cin >> a>>b;
if((b*30)<=a){
std::cout << "YES" << std::endl;
}
else{
std::cout << "NO" << std::endl;
}
t--;
}
return 0;
}
a=int(input())
for i in range(a):
b,c=list(map(int,input().split()))
k=c*30
if(k<=b):
print("YES")
else:
print("NO")
In our experience, we suggest you solve this Monthly Budget 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 Monthly Budget CodeChef Solution
I hope this Monthly Budget 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 >>