結果

問題 No.1974 2x2 Flipper
ユーザー rlangevinrlangevin
提出日時 2022-08-22 19:44:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 86,400 KB
最終ジャッジ日時 2024-04-18 13:29:30
合計ジャッジ時間 7,020 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 AC 85 ms
77,312 KB
testcase_02 AC 62 ms
65,152 KB
testcase_03 AC 141 ms
82,560 KB
testcase_04 AC 104 ms
79,104 KB
testcase_05 WA -
testcase_06 AC 130 ms
80,896 KB
testcase_07 AC 111 ms
79,232 KB
testcase_08 AC 81 ms
76,672 KB
testcase_09 AC 127 ms
81,280 KB
testcase_10 WA -
testcase_11 AC 114 ms
79,744 KB
testcase_12 AC 146 ms
82,048 KB
testcase_13 AC 119 ms
80,128 KB
testcase_14 AC 97 ms
78,848 KB
testcase_15 AC 154 ms
83,456 KB
testcase_16 WA -
testcase_17 AC 133 ms
81,536 KB
testcase_18 AC 75 ms
75,904 KB
testcase_19 AC 82 ms
77,056 KB
testcase_20 AC 103 ms
78,976 KB
testcase_21 AC 174 ms
85,888 KB
testcase_22 AC 180 ms
85,632 KB
testcase_23 AC 183 ms
86,272 KB
testcase_24 WA -
testcase_25 AC 42 ms
52,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
G = [[0] * W for i in range(H)]
ans = 0
for i in range(H - 1):
    for j in range(W - 1):
        if G[i][j] + G[i][j + 1] + G[i + 1][j] + G[i + 1][j + 1] == 0:
            ans += 4
            G[i][j] = 1
            G[i][j + 1] = 1
            G[i + 1][j] = 1
            G[i + 1][j + 1] = 1
print(ans)
for i in range(H):
    print(*G[i])
0