SCU practice contest 3 for grade 2010 new ACMers

H: A Simple Problem with Integers