結果

問題 No.1398 調和の魔法陣 (構築)
ユーザー Ultimate_Tea_04Ultimate_Tea_04
提出日時 2021-02-20 00:44:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 11,812 KB
実行使用メモリ 13,916 KB
最終ジャッジ日時 2023-10-17 04:18:48
合計ジャッジ時間 36,645 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,072 KB
testcase_01 AC 29 ms
10,072 KB
testcase_02 AC 28 ms
10,072 KB
testcase_03 AC 28 ms
10,072 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 371 ms
13,904 KB
testcase_07 WA -
testcase_08 AC 369 ms
13,908 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 377 ms
13,904 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 373 ms
13,908 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 29 ms
10,072 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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