Treat Time

Labiba ma’am wants to give a treat to her favorite student Nafia. But as she now lives abroad, Labib…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

The test cases are weak.
Only prices being less than the budget does not mean they are equal to the budget.
The prices equal to the budget are also within the budget.
No test cases like

a a b
a b a
a a a

here a and b are integers

#include <stdio.h>

int main() {
int a,b,c;
scanf(“%d”,&a);
scanf(“%d %d”,&b,&c);
if(a>=b+c){
printf(“Chocolate”);
}
else if(a<b+c){
printf(“Ice cream”);
}
return 0;
}

problem??

This problem totally doesn’t make sense!

@hjr265 it seems like I had found some problems in this problem a long time ago.

Well, realistically you can’t understand why Shuvo would do that :rofl:. I can only think that Shuvo doesn’t know if his teacher would give him money so he is planning to bet on his luck for making the decision. :sweat_smile:

So, just code the logics that appeared of the problem statement for this particular problem.

I personally dislike these silly problem statements a lot.

It’s just a matter of fact that Toph’s archive has a lot of trivial problems that weren’t prepared with a lot of thought behind them.

I am inclined towards removing this problem from the archive. But, let me see if I can rewrite the statement to make some sense out of it. And, also fix that issue with the dataset. (Thank you @touhidur.)