結果

問題 No.1974 2x2 Flipper
ユーザー gew1fw
提出日時 2025-06-12 14:01:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 82,816 KB
実行使用メモリ 76,672 KB
最終ジャッジ日時 2025-06-12 14:02:35
合計ジャッジ時間 5,199 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 21 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())

max_rows = H if H % 2 == 0 else H - 1
max_cols = W if W % 2 == 0 else W - 1
max_ans = max_rows * max_cols

print(max_ans)
for i in range(1, H + 1):
    row = []
    for j in range(1, W + 1):
        if i <= max_rows and j <= max_cols:
            row.append('1')
        else:
            row.append('0')
    print(' '.join(row))
0