Created
February 5, 2018 21:30
-
-
Save Ge0/3d103315b54d47ff3c3737b31e1b4ed9 to your computer and use it in GitHub Desktop.
Prime number next to X
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
x=input()+1 | |
while 1: | |
if(all(x%j for j in range(2,int(x**.5)+1))):print([x,2][x==1]);break | |
x+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment