You need to sign in or sign up before continuing.×
7 kyu

Next Prime

1,959 of 3,813zruF

Description:

Get the next prime number!

You will get a numbern (>= 0) and your task is to find the next prime number.

Make sure to optimize your code: there will numbers tested up to about 10^12.

Examples

5   =>  7
12  =>  13
Algorithms

Stats:

CreatedApr 3, 2017
PublishedApr 3, 2017
Warriors Trained8603
Total Skips151
Total Code Submissions18091
Total Times Completed3813
JavaScript Completions1959
Python Completions1160
Haskell Completions92
C++ Completions391
Ruby Completions152
Fortran Completions12
C Completions83
COBOL Completions6
Rust Completions54
Go Completions66
D Completions8
Lua Completions7
Total Stars110
% of votes with a positive feedback rating84% of 678
Total "Very Satisfied" Votes511
Total "Somewhat Satisfied" Votes119
Total "Not Satisfied" Votes48
Total Rank Assessments12
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • zruF Avatar
  • g964 Avatar
  • anter69 Avatar
  • smile67 Avatar
  • donaldsebleung Avatar
  • Voile Avatar
  • MrZizoScream Avatar
  • rowcased Avatar
  • KenKamau Avatar
  • FArekkusu Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
  • PetitLu117 Avatar
Ad