Chain square

Problem Name:
Chain square
Site:HackerEarth
Links:
Tags: