Pair of roses wrong ans

ques–https://hack.codingblocks.com/contests/c/509/696
ans–https://ide.codingblocks.com/#/s/26050

when i am running my code on ide it is give correct output for every testcase i entered but in contesst platform it is saying wrong ans on submitting.please help me with it. given blelow is link to my code

https://ide.codingblocks.com/#/s/27425

Two changes:

  1. min was not updated
  2. Printing statement missed a full stop at the end.