結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,428 KB
testcase_01 AC 89 ms
76,272 KB
testcase_02 AC 52 ms
64,072 KB
testcase_03 AC 123 ms
81,664 KB
testcase_04 AC 86 ms
78,084 KB
testcase_05 WA -
testcase_06 AC 104 ms
79,728 KB
testcase_07 AC 93 ms
78,116 KB
testcase_08 AC 60 ms
73,752 KB
testcase_09 AC 105 ms
80,008 KB
testcase_10 WA -
testcase_11 AC 93 ms
78,684 KB
testcase_12 AC 124 ms
81,588 KB
testcase_13 AC 100 ms
79,220 KB
testcase_14 AC 83 ms
77,408 KB
testcase_15 AC 134 ms
82,676 KB
testcase_16 WA -
testcase_17 AC 117 ms
80,508 KB
testcase_18 AC 58 ms
72,816 KB
testcase_19 AC 69 ms
75,876 KB
testcase_20 AC 88 ms
78,080 KB
testcase_21 AC 156 ms
85,056 KB
testcase_22 AC 154 ms
85,016 KB
testcase_23 AC 159 ms
85,112 KB
testcase_24 WA -
testcase_25 AC 40 ms
53,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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