Created
September 24, 2019 17:36
-
-
Save geekykant/54b35ff7145eb43a3478f363c6f8c072 to your computer and use it in GitHub Desktop.
anss
This file contains 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
def get_a(n): | |
a = next_large_prime(n) | |
def next_large_prime(num): | |
while(True): | |
num+=1 | |
if(is_prime(num)): | |
return num | |
def is_prime(num): | |
for i in range(2,num): | |
if (num % i) == 0: | |
return False | |
else: | |
return True | |
num = input() | |
get_a(num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment