結果

問題 No.84 悪の算盤
ユーザー gorugo30gorugo30
提出日時 2021-02-26 17:40:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,028 KB
実行使用メモリ 53,560 KB
最終ジャッジ日時 2024-04-10 07:27:32
合計ジャッジ時間 1,387 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,496 KB
testcase_01 AC 37 ms
52,104 KB
testcase_02 AC 37 ms
52,692 KB
testcase_03 AC 38 ms
52,208 KB
testcase_04 AC 37 ms
52,124 KB
testcase_05 AC 38 ms
53,288 KB
testcase_06 AC 38 ms
53,444 KB
testcase_07 AC 38 ms
52,220 KB
testcase_08 AC 36 ms
52,376 KB
testcase_09 AC 38 ms
52,440 KB
testcase_10 AC 38 ms
53,560 KB
testcase_11 AC 38 ms
52,684 KB
testcase_12 AC 37 ms
52,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R, C = map(int, input().split())
if R == C and R & 1:
    K = (1 + R // 2) * (C // 2)
elif R == C:
    K = (R // 2) * (C // 2) - 1
else:
    if (R * C) & 1:
        K = 2 * (R // 2) * (C // 2) + (C // 2) + (R // 2)
    else:
        K = (R * C) // 2 - 1
print(K)
0