TopCoder: SRM625