Created
October 25, 2020 13:28
-
-
Save matbur/30026b02078b6e08170bab7987dd7623 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
#!/usr/bin/env python3 | |
import sys | |
def main(): | |
""" | |
Q: Why? | |
A: | |
1/n == 1/a + 1/b, where n, a, b is Natural and a != b | |
1/n == 1/a + 1/b | |
ab == n(a+b) | |
n == ab/(a+b) | |
Let's assume: | |
a = n + 1 | |
b = a * n = n(n+1) = n^2 + n | |
Then: | |
n == ab/(a+b) | |
n == (n + 1) * (n^2 + n) / (n + 1 + n^2 + n) | |
n == (n + 1) * n *(n + 1) / (n^2 + 2 * n + 1) | |
n == (n + 1)^2 * n / (n + 1) ^ 2 | |
n == n | |
So for every n greater than 1, anser is YES. | |
""" | |
inp = int(sys.argv[1]) | |
if inp == 1: | |
print("NO") | |
else: | |
print("YES") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment