LoginSignup
2
2

More than 3 years have passed since last update.

【AtCoder用】標準入力メモ

Last updated at Posted at 2020-02-13

モチベ

AtCoderの過去問埋めでいつも忘れてしまう標準入力の備忘録

int2つ

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

横多数 str

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

横多数 int

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

縦N回 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)]

以下のようなgridとか

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

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2