結果

問題 No.84 悪の算盤
ユーザー mlihua09mlihua09
提出日時 2020-09-15 03:15:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,440 KB
実行使用メモリ 71,196 KB
最終ジャッジ日時 2023-09-04 01:27:58
合計ジャッジ時間 2,254 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,100 KB
testcase_01 AC 72 ms
71,040 KB
testcase_02 AC 75 ms
70,960 KB
testcase_03 AC 71 ms
71,120 KB
testcase_04 AC 71 ms
70,956 KB
testcase_05 AC 71 ms
71,096 KB
testcase_06 AC 71 ms
71,092 KB
testcase_07 AC 70 ms
71,196 KB
testcase_08 AC 70 ms
70,960 KB
testcase_09 AC 71 ms
71,124 KB
testcase_10 AC 70 ms
70,964 KB
testcase_11 AC 70 ms
70,896 KB
testcase_12 AC 70 ms
71,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


R, C = map(int, input().split())

if R != C:
    print((R // 2) * C + (R % 2) * ((C + 1) // 2) - 1)

else:
    
    print((R // 2) ** 2 + (R % 2) * (R // 2 + 1) - 1)
0