Rosetta Problems

ジグザグ数 (Zig-Zag Numbers)

https://atcoder.jp/contests/joi2012yo/tasks/joi2012yo_f