99% of the pajeet monkeys won't solve this efficiently.
write a function which expects as input two positive integers integers A , B and returns the sum of all numbers which A mod B == 0
99% of the pajeet monkeys won't solve this efficiently.
write a function which expects as input two positive integers integers A , B and returns the sum of all numbers which A mod B == 0
Other urls found in this thread:
Pass on doing your homework kid.
import homeworksolutions
Question2(number, number)
just try to do it rashid, the last time somebody asked something like these loop and recursive fags came.
Ok if you can answer why
This evals as true
if (regex.test(str) === -1)
This fails to evaluate
If (str.match(regex) === -1)
This also fails to evaluate
Regex.exec(str);
regex.test(str) === -1
is that javascript?
if so, thats impossible since the === operator check for type and the test function returns a boolean. what JS engine are you using?
Sorry typing in phone. Yes JavaScript
-1 I made true
But then the str.match(regex) === -1 failed it's killing me.
It's for Google scripts, using their little engine. It's awful.
>expects... two positive integers integers A, B
>sum of all numbers which A mod B == 0
What? That formula has no free variables
>the sum of all number which A mod B == 0
wtf am I reading OP, if A and B are congruent you don't get a bunch of numbers, you just know they're congruent
def homework(A, B)
return 0 if A % B == 0
raise ':('
end