Rosetta Problems

The J-th Number

https://atcoder.jp/contests/JAG2013Spring/tasks/icpc2013spring_i