結果

問題 No.839 Keep Distance and Nobody Explodes
ユーザー mkawa2mkawa2
提出日時 2019-07-20 18:26:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 11,876 KB
最終ジャッジ日時 2023-08-28 17:22:34
合計ジャッジ時間 3,083 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,916 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 AC 15 ms
7,936 KB
testcase_03 AC 16 ms
7,776 KB
testcase_04 AC 14 ms
7,800 KB
testcase_05 AC 67 ms
11,516 KB
testcase_06 AC 67 ms
11,520 KB
testcase_07 AC 72 ms
11,784 KB
testcase_08 AC 68 ms
11,716 KB
testcase_09 AC 68 ms
11,876 KB
testcase_10 AC 62 ms
11,220 KB
testcase_11 AC 25 ms
8,772 KB
testcase_12 AC 31 ms
9,356 KB
testcase_13 AC 19 ms
8,664 KB
testcase_14 AC 19 ms
8,560 KB
testcase_15 AC 16 ms
8,348 KB
testcase_16 AC 16 ms
8,208 KB
testcase_17 AC 58 ms
10,988 KB
testcase_18 AC 16 ms
8,284 KB
testcase_19 AC 18 ms
8,496 KB
testcase_20 AC 43 ms
10,228 KB
testcase_21 AC 17 ms
8,348 KB
testcase_22 AC 52 ms
10,692 KB
testcase_23 AC 15 ms
7,800 KB
testcase_24 AC 42 ms
10,036 KB
testcase_25 AC 18 ms
8,464 KB
testcase_26 AC 22 ms
8,580 KB
testcase_27 AC 24 ms
8,768 KB
testcase_28 AC 23 ms
8,916 KB
testcase_29 AC 40 ms
9,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
t = [[0] * n for _ in range(n)]
n2=n//2
nn2=n**2//2
k=1
for i in range(n2):
    for j in range(n2):
        t[i][j]=k
        t[i+n2][j+n2]=k+1
        t[i][j+n2]=k+nn2+1
        t[i+n2][j]=k+nn2
        k+=2
for x in t:
    print(*x)
0