結果
| 問題 | No.1398 調和の魔法陣 (構築) |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2021-02-19 22:04:56 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 66 ms / 3,153 ms |
| + 674µs | |
| コード長 | 427 bytes |
| 記録 | |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 64,668 KB |
| 実行使用メモリ | 69,472 KB |
| 最終ジャッジ日時 | 2026-11-01 18:31:49 |
| 合計ジャッジ時間 | 20,093 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
w, h, x = map(int, input().split())
d = [[0] * 3 for _ in range(3)]
for i in range(3):
for j in range(3):
if h % 3 != i % 3 != 2 and w % 3 != j % 3 != 2:
d[i][j] = min(x, 9)
x -= d[i][j]
if x:
print(-1)
exit()
ans = []
for i in range(h):
ans.append([])
for j in range(w):
ans[-1].append(d[i%3][j%3])
for t in ans:
for x in t:
print(x, end='')
print()
Kude