Divisible Permutation

2 secs 1024 MB
mel1's icon mel1

testcase-36.txt


入力

出力