結果

問題 No.1587 012 Matrix
ユーザー とりゐとりゐ
提出日時 2021-07-08 22:56:39
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 102 ms / 1,000 ms
コード長 202 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 77,508 KB
最終ジャッジ日時 2023-09-14 05:25:24
合計ジャッジ時間 3,978 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,072 KB
testcase_01 AC 79 ms
71,132 KB
testcase_02 AC 74 ms
71,076 KB
testcase_03 AC 74 ms
71,576 KB
testcase_04 AC 78 ms
71,496 KB
testcase_05 AC 78 ms
71,572 KB
testcase_06 AC 74 ms
71,344 KB
testcase_07 AC 76 ms
71,412 KB
testcase_08 AC 77 ms
76,028 KB
testcase_09 AC 80 ms
75,876 KB
testcase_10 AC 81 ms
75,876 KB
testcase_11 AC 80 ms
76,012 KB
testcase_12 AC 84 ms
76,076 KB
testcase_13 AC 90 ms
76,612 KB
testcase_14 AC 94 ms
77,044 KB
testcase_15 AC 92 ms
77,096 KB
testcase_16 AC 98 ms
77,200 KB
testcase_17 AC 99 ms
77,236 KB
testcase_18 AC 102 ms
77,008 KB
testcase_19 AC 101 ms
77,096 KB
testcase_20 AC 99 ms
77,476 KB
testcase_21 AC 101 ms
77,508 KB
testcase_22 AC 77 ms
71,280 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