結果

問題 No.35 タイパー高橋
ユーザー MaboyMaboy
提出日時 2021-06-02 16:01:03
言語 Swift
(5.8.1)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 398 bytes
コンパイル時間 11,220 ms
コンパイル使用メモリ 127,228 KB
実行使用メモリ 8,148 KB
最終ジャッジ日時 2023-08-09 13:11:50
合計ジャッジ時間 12,235 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

var score = [0,0]
let N = Int(readLine()!)
for _ in 1...N!{
    let input = readLine()?.split(separator: " ")
    let time = Int(input![0])
    let string = input![1]
    let max:Double = Double(time!) / Double(1000 / Double(12))
    let good = min( Int(max), string.count)
    let bad = string.count - good
    score[0] += good
    score[1] += bad
}
print(score[0],terminator: " ")
print(score[1])
0