結果

問題 No.1213 sio
ユーザー gew1fw
提出日時 2025-06-12 13:04:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 54,048 KB
最終ジャッジ日時 2025-06-12 13:09:49
合計ジャッジ時間 2,404 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())

total = (n * m) // 4

if n == 1 or m == 1:
    max_os = 0
else:
    if n % 2 == 0 and m % 2 == 0:
        max_os = total
    elif n % 2 == 1 and m % 2 == 1:
        max_os = (n * m - 1) // 4
    else:
        max_os = (n // 2) * (m // 2)

min_i = max(0, total - max_os)
print(min_i)
0