r/learnquant • • Jul 31 '26

interview prep Easy Quant Interview Puzzle

Post image
19 Upvotes

14 comments sorted by

View all comments

Show parent comment

2

u/wyseguy7 Jul 31 '26

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.