Last active
April 22, 2016 14:55
-
-
Save alculquicondor/64fafb2af20139bbbb478d64847bcb1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| long ans = 0; | |
| for (int i = 2; i <= a; ++i) | |
| if (sieve.isPrime(i)) { | |
| int ap = a / i, bp = b / i; | |
| for (int j = 1; j <= ap; ++j) | |
| ans += u[j] * (long) (ap / j) * (bp / j); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment