Solution for Round's 1B problem A and common code project
Adding handy tools from polish OI site (TODO: reference)