結果

問題 No.1974 2x2 Flipper
ユーザー 👑 H20H20
提出日時 2022-06-10 22:25:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 81,840 KB
実行使用メモリ 85,260 KB
最終ジャッジ日時 2023-10-21 05:24:36
合計ジャッジ時間 5,643 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,516 KB
testcase_01 AC 68 ms
76,400 KB
testcase_02 AC 50 ms
64,216 KB
testcase_03 AC 120 ms
81,836 KB
testcase_04 AC 85 ms
78,232 KB
testcase_05 WA -
testcase_06 AC 103 ms
79,888 KB
testcase_07 AC 91 ms
78,252 KB
testcase_08 AC 58 ms
73,860 KB
testcase_09 AC 103 ms
80,172 KB
testcase_10 WA -
testcase_11 AC 91 ms
78,836 KB
testcase_12 AC 122 ms
81,724 KB
testcase_13 AC 96 ms
79,352 KB
testcase_14 AC 80 ms
77,560 KB
testcase_15 AC 131 ms
82,852 KB
testcase_16 WA -
testcase_17 AC 114 ms
80,648 KB
testcase_18 AC 55 ms
72,928 KB
testcase_19 AC 65 ms
76,016 KB
testcase_20 AC 86 ms
78,240 KB
testcase_21 AC 154 ms
85,184 KB
testcase_22 AC 152 ms
85,152 KB
testcase_23 AC 153 ms
85,256 KB
testcase_24 WA -
testcase_25 AC 39 ms
53,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W = map(int, input().split())
MAP = [[1]*W for _ in range(H)]
if H>1 and W>1 and H%2==1 and W%2==1:
    MAP[0][W-1]=0
elif H%2==1:
    MAP[H-1]=[0]*W
elif W%2==1:
    for i in range(H):
        MAP[i][W-1]=0

ans = 0
for map in MAP:
    ans+=sum(map)

print(ans)
for map in MAP:
    print(*map)
0