Rosetta Problems

Exhaustive Search

https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_5_A