[For AtCoder] Standard input memo

Motivated

A memorandum of standard input that you always forget when filling in the past questions of AtCoder

two int

N,Q = map(int, input().split())

Horizontal many str

l = [s for s in input().split()]

Horizontal many ints

l = list(map(int,input().split()))

Vertical N times int

i = [int(input()) for i in range(N)]

N×M int

l = [[int(i) for i in input().split()] for j in range(M)]

Like the following grid

##.#
....
##.#
.#.#

grid = np.array([list(input()) for _ in range(h)], dtype="U1") 

Recommended Posts

[For AtCoder] Standard input memo
Atcoder standard input set for beginners (python)
Python3 standard input for competitive programming
AtCoder devotion memo (11/12)
[Python] Standard input
Standard input summary
AtCoder devotion memo (11/11)
Linux standard textbook memo 1
Linux standard textbook memo 3
[Python] About standard input
Standard input / output summary
Python memo (for myself): Array
Write standard input in code
[Python3] Standard input [Cheat sheet]
Linux standard textbook memo 1 part 2
Part 1 of receiving standard input
[For beginners] Summary of standard input in Python (with explanation)
Python3 standard input (competition pro)
Standard input / summary / python, ruby
Python Input Note in AtCoder
Linux standard textbook memo part 6
Matrix representation with Python standard input
[Memo] Substitute unnecessary variables for "_" (underscore)
[For memo] Linux Part 1 vi editor
[Memo] Links for developing with Flask
Input / output with Python (Python learning memo ⑤)
AtCoder ARC002 C-About command input lies
Created AtCoder test tool for Python
Notes for Python file input / output
[Reading memo] Linux standard textbook (Chapter 7-8)