I'm working on a HackerRank samples. For some reasons, the output needs to have 1 decimal place even if the actual number is a round number.
For example, even though my answer is theoretically correct, which is 32, HackerRank considers it as false because 32 is not 32.0
I've also tried
format(32, nsmall = 1)
But this is still an error because the output comes with " ".
I've looked into Formatting Decimal places in R, but this doesn't answer my question.
The output must not be "32.0", it must be 32.0