>outcodes you
Outcodes you
>has entered the chat
hello again
Maybe but chingchong will outcode the jeet
durgasoft... I kneel.....
Okay anons, create your own function that takes a positive integer as an input and returns a boolean value that verifies whether the input is a prime number or not. Attach an image of your hand to confirm your skin color.
>Okay anons, create your own function that takes a positive integer as an input and returns a boolean value that verifies whether the input is a prime number or not. Attach an image of your hand to confirm your skin color.
they black guy would clearly win unironically
which language sir
Unless your a math nerd: for every odd n check from 3 to floor(sqrt(n)) if n is divisible by that number. Complexity is O(n).
Complexity is O(n^.5)
they lack an individualism that on one hand is funny and on the other is mildly disconcerting
good morning sir
public static boolean IsPrime(int input) {
int c = 0;
for (int i = 2; i < input; i++) {
if (input % i == 0) {
c++;
}
}
return c == 0;
}
int IsPrime(int input) {
for (int i = 2; i < input; i++) {
if (!(input % i)) return 0;
}
return 1;
}
Prince of planet durga
I love indians being in the field as a security guy. They're usually hot garbage at security shit and will leave blatant holes in whatever they do for me to repair. My job is the best.
bastard motherfuck sir i will come rape give me your job bloody bastard sir
you only need to check until input/2
You sound like someone who's seen some PHP string interpolation in SQL queries in your time.
You know I googled Miller Rabin in C with a view to implement it in a different language and first hit confirms your suggestion.
Literally second DDG hit for "php sql query"
>outshits you