結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,772 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 16 ms
7,828 KB
testcase_03 AC 15 ms
7,788 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,788 KB
testcase_06 AC 16 ms
7,932 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,896 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 16 ms
7,856 KB
testcase_14 AC 16 ms
7,716 KB
testcase_15 WA -
testcase_16 AC 17 ms
7,828 KB
testcase_17 AC 16 ms
7,752 KB
testcase_18 AC 16 ms
7,792 KB
testcase_19 AC 17 ms
7,884 KB
testcase_20 AC 15 ms
7,792 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:
    line1 = str(x % 9) + str(int(x > 9) * 9) + "0"
    line1 *= w // 3 + 1
    line1 = line1[:w]
    line2 = str(int(x > 18) * 9) + str(int(x > 27) * 9) + "0"
    line2 *= w // 3 + 1
    line2 = line2[:w]
    line3 = "0" * w
    lines = [line1, line2, line3]
    for l in range(h):
        print(lines[l % 3])
0