結果

問題 No.84 悪の算盤
ユーザー lloyzlloyz
提出日時 2023-07-17 01:57:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 180 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 11,688 KB
実行使用メモリ 9,964 KB
最終ジャッジ日時 2023-10-17 23:57:27
合計ジャッジ時間 1,470 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 28 ms
9,964 KB
testcase_03 AC 28 ms
9,964 KB
testcase_04 AC 28 ms
9,964 KB
testcase_05 AC 28 ms
9,964 KB
testcase_06 AC 28 ms
9,964 KB
testcase_07 AC 28 ms
9,964 KB
testcase_08 AC 28 ms
9,964 KB
testcase_09 WA -
testcase_10 AC 28 ms
9,964 KB
testcase_11 AC 28 ms
9,964 KB
testcase_12 AC 28 ms
9,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

r, c = map(int, input().split())

if r > c:
    r, c = c, r
ans = (r // 2) * c
if r % 2 == 1:
    ans += c // 2
if r == c:
    ans //= 2
if c % 2 == 1:
    ans += 1
print(ans - 1)
0