結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,460 KB
testcase_01 AC 70 ms
76,348 KB
testcase_02 AC 51 ms
64,156 KB
testcase_03 AC 126 ms
81,776 KB
testcase_04 AC 88 ms
78,172 KB
testcase_05 WA -
testcase_06 AC 107 ms
79,832 KB
testcase_07 AC 89 ms
78,192 KB
testcase_08 AC 59 ms
73,804 KB
testcase_09 AC 103 ms
80,116 KB
testcase_10 WA -
testcase_11 AC 93 ms
78,780 KB
testcase_12 AC 120 ms
81,732 KB
testcase_13 AC 99 ms
79,296 KB
testcase_14 AC 80 ms
77,504 KB
testcase_15 AC 132 ms
82,796 KB
testcase_16 WA -
testcase_17 AC 112 ms
80,592 KB
testcase_18 AC 55 ms
72,868 KB
testcase_19 AC 66 ms
75,960 KB
testcase_20 AC 85 ms
78,188 KB
testcase_21 AC 151 ms
85,128 KB
testcase_22 AC 156 ms
85,096 KB
testcase_23 AC 158 ms
85,200 KB
testcase_24 WA -
testcase_25 AC 39 ms
53,460 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[H-1][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