This post is all about the solution of the Cost of Groceries Starters 70 (Rated till 6-Stars) codechef problem solution.


Cost of Groceries Starters 70 (Rated till 6-Stars) codechef problem solution

Codechef 



AI based Love Calculator



Problem Statement:

Cook went to the grocery store to get some new ingredients. There are NN items in the store, with the ithi th item having a freshness value A iA I and a price B iB i.

Cook has decided to buy all items with a freshness value greater than or equal to XX. Calculate the total cost of the groceries Chef purchases.

Format of Input :

The number of test cases will be indicated by a single integer TT on the first line of input.
Each test case contains several lines of input.
Evey test case's first line contains two space-separated integers NN and XX, which represent the number of items and the minimum freshness value an item should have.
The second line contains an array of NN space-separated integers, denoting the freshness value of each item.
The third line contains an array BB of NN space-separated integers that represent the price of each item.

Format of the Output :

For every test case, print the total cost of the groceries Chef purchases on a new line.

AI based Love Calculator




Also Check this out:-

Spice Level Starters 70 (Rated till 6-Stars) codechef problem solution, Click Here

Solution of the Problem: Click Here