atcoderで以下のような入力をうけとらなければならない問題があったのでメモ
3 //入力数N
2 4 6 //A1 ・・・AN
という入力があるとき、このNとA1~ANをリストに格納する方法を載せます。
N=int(input())
array = list(map(int,input().strip().split()))
簡単!記事にする必要あったかという疑問...
Go to list of users who liked
More than 3 years have passed since last update.
atcoderで以下のような入力をうけとらなければならない問題があったのでメモ
3 //入力数N
2 4 6 //A1 ・・・AN
という入力があるとき、このNとA1~ANをリストに格納する方法を載せます。
N=int(input())
array = list(map(int,input().strip().split()))
簡単!記事にする必要あったかという疑問...
Register as a new user and use Qiita more conveniently
Go to list of users who liked