Added SRM 603, Div 1 500, improved number theory code