結果

問題 No.1587 012 Matrix
ユーザー とりゐとりゐ
提出日時 2021-07-08 22:56:39
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 202 bytes
コンパイル時間 274 ms
使用メモリ 82,292 KB
最終ジャッジ日時 2023-02-01 19:03:23
合計ジャッジ時間 4,266 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 89 ms
75,656 KB
testcase_01 AC 89 ms
75,824 KB
testcase_02 AC 87 ms
75,772 KB
testcase_03 AC 87 ms
75,552 KB
testcase_04 AC 86 ms
75,800 KB
testcase_05 AC 87 ms
75,724 KB
testcase_06 AC 86 ms
75,492 KB
testcase_07 AC 88 ms
75,636 KB
testcase_08 AC 90 ms
80,216 KB
testcase_09 AC 93 ms
80,440 KB
testcase_10 AC 94 ms
80,420 KB
testcase_11 AC 95 ms
80,356 KB
testcase_12 AC 97 ms
80,344 KB
testcase_13 AC 104 ms
82,100 KB
testcase_14 AC 106 ms
81,684 KB
testcase_15 AC 107 ms
81,344 KB
testcase_16 AC 108 ms
81,636 KB
testcase_17 AC 109 ms
81,416 KB
testcase_18 AC 112 ms
81,680 KB
testcase_19 AC 115 ms
82,292 KB
testcase_20 AC 115 ms
82,164 KB
testcase_21 AC 114 ms
81,416 KB
testcase_22 AC 87 ms
75,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
for i in range(n):
  a=''
  for j in range(n):
    if i+j<n-1:
      a+='2'
    elif i+j==n-1:
      if i<n//2:
        a+='2'
      else:
        a+='1'
    else:
      a+='0'
  print(a)
0