Notice
Recent Posts
Recent Comments
04-30 09:16
«   2024/04   »
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
Archives
Today
Total
관리 메뉴

Byeol Lo

Python - 백준 입출력 본문

Programming Language/Python

Python - 백준 입출력

알 수 없는 사용자 2022. 3. 14. 21:41

입력 한 줄 일때,

N = input()

 

입력이 한 줄에 여러 개 일때,

# line = input().split()
# below is the better.

from sys import readline
line = readline().rstrip() # line 넘김 제거

 

입력이 여러 줄일때,

from sys import stdin

# 개수를 입력받아
T = int(input())

for _ in range(T) :
	# 한 줄당 list 형태로 출력, 확인 작업
	print(list(map(int, stdin.readline().split())))
    
    # 시행할 거리 밑에 코딩

 

Comments