結果

問題 No.35 タイパー高橋
ユーザー kshiva1126
提出日時 2019-03-31 20:15:44
言語 Go
(1.23.4)
結果
AC  
実行時間 97 ms / 5,000 ms
コード長 410 bytes
コンパイル時間 14,463 ms
コンパイル使用メモリ 232,436 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-22 07:56:54
合計ジャッジ時間 14,847 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main(){
    var n int
    fmt.Scan(&n)
    
    var t, ok, miss int
    var s string
    for i := 0; i < n; i++ {
        fmt.Scan(&t, &s)
        cantype := t * 12 / 1000
        strcnt := len(s)
        if cantype >= strcnt {
            ok += strcnt
        } else {
            ok += cantype
            miss += strcnt - cantype
        }
    }
    fmt.Println(ok, miss)
}
0