SPOJ Solution

SPOJ solution in C#