結果

問題 No.35 タイパー高橋
ユーザー MaboyMaboy
提出日時 2021-06-02 16:01:03
言語 Swift
(5.10.0)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 398 bytes
コンパイル時間 6,090 ms
コンパイル使用メモリ 127,836 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2024-04-27 08:11:19
合計ジャッジ時間 6,633 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
9,344 KB
testcase_01 AC 14 ms
9,216 KB
testcase_02 AC 18 ms
9,216 KB
testcase_03 AC 18 ms
9,216 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