WA in STFOOD (JANLUNCHTIME)

this code is running right on code,compile&run but showing wrong answer on submission … please can someone tell what is wrong in this…
https://www.codechef.com/viewsolution/29186983

read the question carefully , the order of input is S,P,and V . here S-no of shops
P-no of people and V=value of item(cost). you should use (P/(S+1))*V . you have taken P as cost and V as no of people ,
see the correction(line 30 and 31) of this answer link:-http://codechef.com/viewsolution/29187405

always read constraints carefully

1 Like

Thankyou!

1 Like

did you got it ? check link if you have any doubt.

1 Like

yeah ,I got it. Thanks

1 Like

Even i lost time coz i didnt read the order of input :sweat_smile:

1 Like

lol, it has happened with me too quiet a few times:sweat_smile::sweat_smile: