Pajeet monkey detector

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

Attached: il_340x270.1152513152_f1ww.jpg (340x270, 10K)

Other urls found in this thread:

Jow
twitter.com/SFWRedditImages

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

do you have a concrete example?, can't see a case where you get a number from match or test, one returns an object and other a boolean :\ can't see how === "cast" to a number.

Wait, your right.. looking at my screenshot I had -1 FFS! I hate JavaScript. Thank you :)

```java
test
```

Busting my laptop open now to test give me a few.

about three fiddy

Jow Forums.org/rules

>the sum of all numbers which A mod B == 0
Indian confirmed.

>and returns the sum of all numbers which A mod B == 0
There are no numbers which "A mod B == 0", that doesn't describe any number.

unsigned int Poo(unsigned int india, unsigned int inLoo){
// returns the sum of all numbers which A mod B == 0 please explain it
}

lol I read your problem, thought it made sense, then read it against and realized it makes none, is that the test?

Okay.. so not opening Jow Forums on my work laptop.. so I'll type a little on my phone.

>//body will be equal to text like thing 2 [delay: 1m] thing 3 [delay: 3m]
if (regex.test(body) === true) {
> //Regex below is the same as regex above. So i know it matches
var delayexp = /(delay: [0-9]m|delay: \d{1,2}(?!\d)h)/
var delay_array = body.match(delayexp)

>sum of all numbers which A mod B == 0
let's assume you mean pos. integers
>sum over all x in { n in N | A mod B == 0}
if A mod B == 0 then {n in N | true} = N => sum over all x in N
if A mod B != 0 then {n in N | false} = {} => empty sum = 0

so a function that either returns +Inf or 0, got it.

yes it does, it just happens that the statement A(x) is actually independent of x so you either get the set or the empty set (see above)

The question makes no sense, OP, are you sure you know modular arithmetic? Either A is 0 mod B or it isn't, there are no other numbers here to sum.

If you meant sum of all numbers that multiplied by A are 0 mod B, I'll just save time and raise an int over overflow as the first line of the program.

99.9% of working as a dev involves doing work nothing related to this and the remaining 0.1% that it does you will just google for the solution

Go be racist somewhere else

Pajeet monkey detected.

>Returns the sum of all numbers which A mod B == 0
What is that supposed to mean, pajeet?

>input two positive integers integers A , B
>returns the sum of all numbers which A mod B == 0
This makes no sense, you dipshit.

lmao @ all the retards who tried something.
OP is a shithead and kant into ingles.

Attached: 1522614242592.png (1024x530, 265K)

function pajeet(a, b) {
if (a%b === 0) {
return -1/12; // 1 + 2 + 3 + 4 + ... = -1/12
} else {
return 0;
}
}

>-1/12

ayylmao finally.

hired.

whatever makes you feel better about yourself my dude

>my dude

Attached: index.jpg (221x228, 13K)

>all numbers
>acknowledges only positive integers

OP is guaranteed retarded

>solve this efficiently.
found a pajeet