0
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 1 year has passed since last update.

paizaラーニング「【二次元配列の入出力】i番目の出力 Boss Python3編」

Posted at

私の解答

values = input().split()
N = int(values[0])
M = int(values[1])
K = int(values[2])
L = int(values[3])

A = [[0] * M for _ in range(N)]
for i in range(N):
    values = input().split()
    for j in range(M):
        A[i][j] = int(values[j])

print(A[K - 1][L - 1])

前の問題の解答例を参考にしたので、同じになりました!

解答例

values = input().split()
N = int(values[0])
M = int(values[1])
K = int(values[2])
L = int(values[3])

A = [[0] * M for _ in range(N)]
for i in range(N):
    values = input().split()
    for j in range(M):
        A[i][j] = int(values[j])

print(A[K - 1][L - 1])
0
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
0
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?