p1010 AC

use scanf instead of cin...