測資#17、#18、#19對Python不友好,單行輸入超過5MB,用input()讀會Memory error,解決方法是寫一個generator,用sys.stdin.read(1)一次讀一個字元,一次輸出一個int。