# Reply To: Puzzles

The mystery of the silver bullet › Forums › The Intelligence Room › Puzzles › Reply To: Puzzles

Nice puzzle USB-C, I did indeed have fun solving it!

My solution:

Note that 10000 = 100 squared. At any step, the root of the largest square number not more than N is the integer part of the square root of N. Since we remove this square number, and any squares less than it, this square root equals the total number of cards removed.

Suppose we have N = (n + 1)^2 for integer n >= 1.

- First step: N = n^2 + n + (n + 1); and int(sqrt(N)) = n + 1. So N – int(sqrt(N)) = n^2 + n = n(n + 1).
- Second step: Now N = n(n + 1). So int(sqrt(N)) = n. Therefore N – int(sqrt(N)) = n^2 + n – n = n^2.

So when N is (n + 1)^2 for integer n >= 1, we can always take two steps and will end up with n^2 as the new N.

We begin with n + 1 = 100, and end with n + 1 = 2 (because after taking two steps we have n^2 = 1^2 = 1). Therefore there are a total of 99 values of n (n = 99, …, n = 1). So the number of steps is 99*2 = 198.