fix the input data bug

fixed the bug about scanf function