http://www.codechef.com/viewsolution/3312318
please help getting wrong answer
problem link http://www.codechef.com/problems/BUY1GET1
http://www.codechef.com/viewsolution/3312318
please help getting wrong answer
problem link http://www.codechef.com/problems/BUY1GET1
i think there are some unnecessary spaces in the test file. i replaced “gets()” with “cin” and got accepted. accepted solution http://www.codechef.com/viewsolution/3313744.
hope this helps