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

AC in 0.015
Posted by Aditya Singh 15 Apr 2017 05:24
[code deleted]

Edited by moderator 19.11.2019 23:40
Re: AC in 0.015
Posted by Igor Kulatov 10 Feb 2018 15:29
Hi,

Very good solution! Just one note, it doesn't affect AC, but:

In D+=(i+N/i); if (i == N/i) you don't need to add both i and N/i, but just i.

In this case result of check(N) will be 100% equal to triviality(N) in all cases.