Lucas Theorem - Preparation to IOI Part 6