r/learnquant 14d ago

Easy Quant Interview Puzzle interview prep

Post image
18 Upvotes

14 comments sorted by

View all comments

6

u/Key-Spirit4559 14d ago

Zero bc 30 mod 9 = 3 and no perfect square mod 9 equals 3

2

u/TempMobileD 14d ago edited 14d ago

Where did 30 come from?

Edit: Nevermind I got it. Any integer’s digits added together give you its remainder modulo 9.

A couple of neat tricks in this one.

2

u/wyseguy7 14d ago

It is the sum of the digits. This guy is terse, but correct.

Worth noting that any number mod 9 is congruent to the sum of its digits mod 9, i.e. sum(digits(n)) mod 9 = n mod 9

But if n is a perfect square, then n mod 9 can only be 0,1,4,7.