Skip to content

Instantly share code, notes, and snippets.

@Ge0
Created February 5, 2018 21:30
Prime number next to X
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