ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1118. Nontrivial Numbers

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
Re: To admins : triviality of 1
Posted by 10k 26 Nov 2022 22:51
I'm not an admin.
You must write the number with minimal triviality. Triviality(1) == 0, that means you have to print 1 because 1 is number with minimal triviality. But you try to print the triviality of 1(i.e. 0). The statement is correct.