結果

問題 No.35 タイパー高橋
ユーザー KuraKura
提出日時 2019-02-21 12:55:50
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 467 bytes
コンパイル時間 1,270 ms
コンパイル使用メモリ 62,416 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-11 01:25:08
合計ジャッジ時間 1,908 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
    int n;
    cin>>n;
    vector<int> t(n);
    vector<string> s(n);
    for(int i=0;i<n;i++){
        cin>>t[i]>>s[i];
        t[i]=0.012*t[i];
    }
    int a=0;
    int b=0;
    for(int i=0;i<n;i++){
        if(s[i].length()>t[i]){
            a+=s[i].length()-t[i];
            b+=t[i];
        }else{
            b+=s[i].length();
        }
    }
    cout<<b<<' '<<a<<endl;
}
0