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
Similar Kata:
Stats:
Created | Apr 3, 2017 |
Published | Apr 3, 2017 |
Warriors Trained | 8603 |
Total Skips | 151 |
Total Code Submissions | 18091 |
Total Times Completed | 3813 |
JavaScript Completions | 1959 |
Python Completions | 1160 |
Haskell Completions | 92 |
C++ Completions | 391 |
Ruby Completions | 152 |
Fortran Completions | 12 |
C Completions | 83 |
COBOL Completions | 6 |
Rust Completions | 54 |
Go Completions | 66 |
D Completions | 8 |
Lua Completions | 7 |
Total Stars | 110 |
% of votes with a positive feedback rating | 84% of 678 |
Total "Very Satisfied" Votes | 511 |
Total "Somewhat Satisfied" Votes | 119 |
Total "Not Satisfied" Votes | 48 |
Total Rank Assessments | 12 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |