結果
問題 |
No.84 悪の算盤
|
ユーザー |
|
提出日時 | 2022-01-19 22:10:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 51,968 KB |
最終ジャッジ日時 | 2024-11-23 14:06:25 |
合計ジャッジ時間 | 1,567 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 2 |
ソースコード
r,c = map(int,input().split()) if r == c: if r%2: print((r+1)//2*(c+1)//2-1-r//2) else: print(r//2*c//2) else: if r%2 == 0 and c %2 == 0: print(r*c//2-1) elif r%2 and c%2: print(max((r+1)//2*c-c//2-1,(c+1)//2*r-r//2-1)) else: print(r*c//2-1)