Output currect but showing wrong answer

I have solved a problem by specified input in example and output returns like specified. But it showing my program wrong. Would you please tell me someone what is the issue ?

I am using PHP 7.1.0

//