Update README.md
Browse files
README.md
CHANGED
|
@@ -508,7 +508,7 @@ The algorithm runs in \(O(n \log \log n)\) due to the sieve operation, which is
|
|
| 508 |
### Solution Code
|
| 509 |
Here is the Python implementation of the described approach:
|
| 510 |
|
| 511 |
-
|
| 512 |
def main():
|
| 513 |
import sys
|
| 514 |
n = int(sys.stdin.readline())
|
|
@@ -542,6 +542,7 @@ def main():
|
|
| 542 |
|
| 543 |
if __name__ == "__main__":
|
| 544 |
main()
|
| 545 |
-
|
| 546 |
|
| 547 |
-
This code reads the input, computes the necessary values using a sieve-based approach, assigns values efficiently, and outputs the results ensuring that the maximum value is minimized while satisfying the coprimality condition.
|
|
|
|
|
|
| 508 |
### Solution Code
|
| 509 |
Here is the Python implementation of the described approach:
|
| 510 |
|
| 511 |
+
'''python
|
| 512 |
def main():
|
| 513 |
import sys
|
| 514 |
n = int(sys.stdin.readline())
|
|
|
|
| 542 |
|
| 543 |
if __name__ == "__main__":
|
| 544 |
main()
|
| 545 |
+
'''
|
| 546 |
|
| 547 |
+
This code reads the input, computes the necessary values using a sieve-based approach, assigns values efficiently, and outputs the results ensuring that the maximum value is minimized while satisfying the coprimality condition.
|
| 548 |
+
```
|