Type casting confusssssed


#1

why in the answer return (int) ans is written?without int it should also run correctly