結果

問題 No.84 悪の算盤
ユーザー 6soukiti296soukiti29
提出日時 2017-08-10 08:42:26
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 4,037 ms
コンパイル使用メモリ 68,124 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 13:59:08
合計ジャッジ時間 4,668 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sequtils,strutils
var
    R,C : int64
    ans : int64
    
(R, C) = stdin.readline.split.map(parseBiggestInt)

if R > C:
    (C, R) = (R, C)

if R == C:
    ans = (R div 2) * ((C + 1) div 2) + 1
else:
    ans = ((R + 1) div 2) * C

echo ans - 1
0