What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-12 22:22:11
how to generate prime numbers in a bit range python
def miller_rabin(n, k): # Implementation uses the Miller-Rabin Primality Test # The optimal number of rounds for this test is 40 # See http://stackoverflow.com/questions/6325576/how-many-iterations-of-rabin-miller-should-i-use-for-cryptograph... Add solution -
C++ 2021-11-12 11:21:22
primos menores que
#include<bits/stdc++.h> using namespace std; bool Is_Prime(long long x){ if(x%2==0)return false; for(int i=3;i*i<=x;i+=2) if(x%i==0)return false; return true; } int main(){ //primes less than n int n; cin>>n; int primes=0,i=1; whi... Add solution -
Javascript 2021-11-05 16:33:16
javascript prime numbers up till a certain number
// prime numbers from zero up till a certain number const sumPrimes = (num) => { let primes=[]; // computing prime numbers from 0 uptill a number num for (let i = 0; i <= num; i++) { let flag = 0; // looping through 2 to ... Add solution -
C++ 2021-11-04 12:17:19
primeros numeors primos menores que
#include<bits/stdc++.h> using namespace std; bool Is_Prime(long long x){ if(x%2==0)return false; for(int i=3;i*i<=x;i+=2) if(x%i==0)return false; return true; } int main(){ //primes less than n int n; cin>>n; int primes=0,i=1; whi... Add solution