結果

問題 No.1974 2x2 Flipper
ユーザー gew1fw
提出日時 2025-06-12 18:59:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 76,572 KB
最終ジャッジ日時 2025-06-12 18:59:49
合計ジャッジ時間 4,803 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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