Very clever. The kind of thing that's obvious once it's seen, leaving one wondering "Why did I never think of this?"
Easily hacked, too. I think making "C" equal to -1 x N! (subtracting the factorial of the unused letters) would add tension. (-1 for 1, -3 for 2, -6 for 3, ... N! for N)