結果

問題 No.35 タイパー高橋
ユーザー mkanenobumkanenobu
提出日時 2018-03-25 13:39:43
言語 Nim
(2.0.2)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 497 bytes
コンパイル時間 3,520 ms
コンパイル使用メモリ 71,340 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 17:52:35
合計ジャッジ時間 3,676 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,376 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 4 ms
4,376 KB
testcase_03 AC 3 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strutils, math

var
    n = readLine(stdin).parseInt
    input = newSeqWith(n, newSeq[string](2))
    miss = 0

for i in 0..<n:
    input[i] = (readLine(stdin).split)

proc main():int =
    for i in input:
        var
            t = i[0].parseFloat
            s = len(i[1])
        if (12 / 1000) * t >= float(s):
            result += s
        else:
            miss += s - int(floor(t / (1000 / 12)))
            result += int(floor(t / (1000 / 12)))

echo main(), " ", miss
0