• + 4 comments

    its because in the last case the input is as follows: 10.25 17 5 the result will be:12.505 if you are simply typecasting then your answer will be 12,which is wrong because you have to "roundoff" not "truncate". so,here the output will be 13. ps-you will get the input/output used in test cases by clicking on the corresponding test cases.

    https://hr-testcases-us-east-1.s3.amazonaws.com/17155/input03.txt?AWSAccessKeyId=AKIAJAMR4KJHHUS76CYQ&Expires=1463489435&Signature=QcTkdd%2F2bEonvBb4pZoLNeMtB9I%3D&response-content-type=text%2Fplain