Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- slow and steady
- addEventListener
- db
- 혼프
- Import
- ajax
- eport
- https://youtube.com/playlist?list=PLuHgQVnccGMA5836CvWfieEQy0T0ov6Jh&si=FTaYv8m21EhO-A2K
- promise
- 비동기
- JS #프로젝트
- callback
- async
- 참고블로그
- https://m.blog.naver.com/tt2t2am1118/221010125300
- await
- setTimeout()
- database
- webpack
- Project
- Porject
- mysql
- object
- js
- 동기
- sql
- 게임
- prj
- json
- execCommand
Archives
- Today
- Total
C-log
💡15552번 본문
728x90
import sys
T = int(input())
for i in range(T):
A, B = map(int, sys.stdin.readline().split())
print(A+B)
input을 사용하지 않고 import sys를 통해서 값을 받아 올 수 있다. testcase는 기존의 input으로 작성해도 런타임, 시간초과가 일어 나지 않는다.
testcase T변수를 input이 아닌 sys.stdin.readline()으로 작성하면 아래와 같다.
import sys
# T = int(input())
T = int(sys.stdin.readline().strip()) # strip()함수를 사용함으로 개행문자 /n을 제거할 수 있다.
for i in range(T):
A, B = map(int, sys.stdin.readline().split())
print(A+B)
아래는 참고하면 좋은 글이다.
728x90
Comments