結果

問題 No.1398 調和の魔法陣 (構築)
ユーザー Ultimate_Tea_04Ultimate_Tea_04
提出日時 2021-02-19 21:33:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 441 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 12,140 KB
最終ジャッジ日時 2023-10-15 00:02:50
合計ジャッジ時間 26,172 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,868 KB
testcase_01 AC 15 ms
7,844 KB
testcase_02 AC 15 ms
7,864 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,804 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 14 ms
7,864 KB
testcase_11 WA -
testcase_12 AC 14 ms
7,816 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 14 ms
7,756 KB
testcase_16 AC 254 ms
12,072 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,748 KB
testcase_21 AC 244 ms
12,060 KB
testcase_22 WA -
testcase_23 AC 14 ms
7,760 KB
testcase_24 WA -
testcase_25 AC 15 ms
7,748 KB
testcase_26 AC 258 ms
11,996 KB
testcase_27 WA -
testcase_28 AC 15 ms
7,844 KB
testcase_29 AC 265 ms
11,948 KB
testcase_30 AC 14 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

w,h,x = map(int,input().split())
if x>9:
    print(-1)
else:
    m = [[0 for _ in range(w)]for __ in range(h)]
    for i in range(1,h,3):
        for j in range(1,w,3):
            m[i][j] = x
    if w%3 == 1:
        for i in range(1,h,3):
            m[i][-1] = x
    if h%3 == 1:
        for i in range(1,w,3):
            m[-1][i] = x
    for i in range(h):
        for j in range(w):
            print(m[i][j],end = "")
        print()
0