why wrong answer?while its giving correct o/p on my system

//flooring program august

//LIVE CONTEST QUESTION.