結果

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

ソースコード

diff #

n, m = map(int, input().split())
s = n * m
r = s % 4

if n == 1 or m == 1:
    print((s - r) // 4)
else:
    if r == 0 or r == 2:
        print(0)
    else:
        if (n % 2 == 1) and (m % 2 == 1):
            print(0)
        else:
            print(1)
0