Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
check Prime
#include <iostream> using namespace std; int main() { int num,i; cin>>num; if(num==0 || num == 1) cout<<"The smallest number is 2"; for(i = 2; i < num; i++) if(num%i==0) { cout<<"Not prime"; break; } if(num == i) cout<<"prime"; }
run
|
edit
|
history
|
help
0
dsu on tree (http://codeforces.com/contest/208/problem/E)
StackQuiz
permutation of 1 to n
Dar
KhadijahAlshehhi
hilbert
RandomMessage
congruence modulo equations (together with a simple BigInteger class)
32535
A • Potato Sacks