Problem: http://www.spoj.com/problems/EKO/ My code: https://onlinegdb.com/BJU227Ctf
it runs well for given test cases and few others I tested on my own like 1 1 1 and 7 27 1 2 3 4 5 6 7
Can anyone suggest what is wrong? or tricky test cases?
Check your output formats.
ahh. thanks