Getting wrong answer in little chef and numbers

my logic is correct but still I am getting wrong answer…and what is the meaning of trailing spaces…how does it affect my program…give me answer…

We cannot help you with WA, because your idea and/or implementation is wrong…

Trailing spaces mean, that there is not "N", but "N " in second line or something like that, but this is not a problem for all implementations…

//