LightOJ – Problem Makes Problem

Problem Name: Problem Makes Problem
Judge: LightOJ
Algorithms & DS: Combinatorics, Modular Arithmatics