Exchange of digits (#766) - Azerbaijan Computing Olympiad