I looked up everywhere but couldn't find a tutorial for this gym contest (VIII Open Programming Championship of Kazan Federal University 2015), and so I'm stuck at problem J Polycarp and Dividend. It looks easy but I couldn't find the solution. Could anyone help me or at least give me a hint?