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