結果

問題 No.1974 2x2 Flipper
ユーザー gew1fw
提出日時 2025-06-12 19:01:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 81,908 KB
実行使用メモリ 76,352 KB
最終ジャッジ日時 2025-06-12 19:01:59
合計ジャッジ時間 5,079 ms
ジャッジサーバーID
(参考情報)
judge4 / 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