Are you able to solve it? (from the teenagers programming contest)(hs.spoj.pl)
hs.spoj.pl
Are you able to solve it? (from the teenagers programming contest)
http://hs.spoj.pl/problems/HS11CNSM/
2 comments
The official contest is over but you can try out here: http://www.spoj.pl/HSPLARCH/problems/HS11CNSM/
Seems like this is something like P = ((N * M) - (N + M - 1))/K but haven't tried out too many cases.
a solution given by the contestant: http://bit.ly/rTrO87