2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Python】任意の数の標準入力をリストに入れる方法

Last updated at Posted at 2020-06-19

atcoderで以下のような入力をうけとらなければならない問題があったのでメモ

3              //入力数N
2 4 6      //A1 ・・・AN

という入力があるとき、このNとA1~ANをリストに格納する方法を載せます。

N=int(input())
array = list(map(int,input().strip().split()))

簡単!記事にする必要あったかという疑問...

2
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?