結果
問題 |
No.1974 2x2 Flipper
|
ユーザー |
![]() |
提出日時 | 2025-04-15 21:46:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 450 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,144 KB |
実行使用メモリ | 85,080 KB |
最終ジャッジ日時 | 2025-04-15 21:48:01 |
合計ジャッジ時間 | 6,359 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 21 WA * 4 |
ソースコード
H, W = map(int, input().split()) # Calculate the maximum number of black cells max_rows = H - (H % 2) max_cols = W - (W % 2) ans = max_rows * max_cols # Generate the grid grid = [] for i in range(H): row = [] for j in range(W): if i < max_rows and j < max_cols: row.append(1) else: row.append(0) grid.append(row) # Output the result print(ans) for row in grid: print(' '.join(map(str, row)))