Code throws TLE: http://www.spoj.com/problems/PISANO/
Abhishek Ghosh
11

It worked fine for the Coursera Assignment. Maybe SPOJ is using different time constraints.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.