잡다로그

[Python/코테] 백준 15552번 빠른 A+B 본문

Algorithm

[Python/코테] 백준 15552번 빠른 A+B

날으는다람쥐 2023. 11. 8. 18:08

15552 빠른 A+B

문제 및 조건 설명: https://www.acmicpc.net/problem/15552

 

import sys

n = int(input())

for i in range(n):
    a, b = map(int, sys.stdin.readline().split())
    print(a+b)

 

나다어 _나는 다음에 어떻게 풀 것인가

  • n은 최대 1,000,000로, 많은 입력을 처리하기 위해서는 input()이 아닌 sys.stdin.readline()을 사용한다.
  • 채점은 콘솔에서 보이는 대로가 아닌, 출력만으로 한다. 즉 내가 보기엔 입력과 출력이 섞여도 출력만 모아 봤을 때 정답이면 괜찮다는 것 !
Comments