結果

問題 No.839 Keep Distance and Nobody Explodes
ユーザー convexineqconvexineq
提出日時 2021-04-07 10:06:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,340 KB
実行使用メモリ 77,888 KB
最終ジャッジ日時 2023-09-04 04:59:37
合計ジャッジ時間 5,630 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,368 KB
testcase_01 AC 71 ms
71,136 KB
testcase_02 AC 73 ms
71,144 KB
testcase_03 AC 76 ms
71,312 KB
testcase_04 AC 72 ms
71,164 KB
testcase_05 AC 97 ms
77,380 KB
testcase_06 AC 97 ms
77,656 KB
testcase_07 AC 95 ms
77,840 KB
testcase_08 AC 97 ms
77,888 KB
testcase_09 AC 97 ms
77,844 KB
testcase_10 AC 97 ms
77,620 KB
testcase_11 AC 88 ms
76,676 KB
testcase_12 AC 85 ms
76,272 KB
testcase_13 AC 84 ms
76,532 KB
testcase_14 AC 84 ms
76,568 KB
testcase_15 AC 82 ms
76,172 KB
testcase_16 AC 80 ms
76,464 KB
testcase_17 AC 95 ms
77,508 KB
testcase_18 AC 83 ms
76,444 KB
testcase_19 AC 87 ms
76,540 KB
testcase_20 AC 93 ms
77,496 KB
testcase_21 AC 86 ms
76,536 KB
testcase_22 AC 100 ms
77,516 KB
testcase_23 AC 72 ms
71,404 KB
testcase_24 AC 93 ms
77,360 KB
testcase_25 AC 82 ms
76,536 KB
testcase_26 AC 85 ms
76,272 KB
testcase_27 AC 86 ms
76,524 KB
testcase_28 AC 82 ms
76,548 KB
testcase_29 AC 90 ms
77,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())//2
r = [[0]*(n*2) for _ in range(n*2)]
for i in range(n):
    for j in range(n):
        c = i*n+j
        r[i][j] = 2*c + 1
        r[i+n][j] = 2*n*n + 2*c + 1
        r[i][j+n] = 2*n*n + 2*c + 2
        r[i+n][j+n] = 2*c + 2
for i in r:
    print(*i)
0