To admins : triviality of 1

Posted by

_icy_ 5 Aug 2022 19:54

If you look at the statement, it says "Triviality of a natural number N is the ratio of the sum of all its proper divisors to the number itself. Recall that a proper divisor of a natural number is the divisor that is strictly less than the number.". Therefore, triviality of 1 should be 0 / 1 == 0, since 1 doesn't have any divisor strictly less than itself. However, I couldn't get an AC (WA4) until I changed the line

if (I == 1) ans = 0

to

if (I == 1) ans = 1.

So, either the statement or the tests are broken.

*Edited by author 05.08.2022 19:55*

*Edited by author 05.08.2022 19:55*