3 ms·
The problem statement said that the input would be natural numbers.
by gnuvince 7y ago
The problem statement said that the input would be natural numbers.
- lifthrasiir 7y agoWait, do natural numbers include zero? evil grin
- talaketu 7y agoNo support for that in Sloane's. https://oeis.org/A000027 https://oeis.org/A000027
- chopin 7y agoI looked up wikipedia which says there's no conclusive definition.
- lifthrasiir 7y agoThe joke is that, if you don't need to check if the input is negative because it is not a natural number, you can also choose a definition of the natural number without zero to avoid special casing it at all.