結果

問題 No.35 タイパー高橋
ユーザー wildwild
提出日時 2017-09-25 00:01:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 483 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 73,748 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-26 17:52:43
合計ジャッジ時間 1,309 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;

int main(){
    int N; 
    cin >> N;

    double t, m;
    string s;

    int r=0,
        n=0;

    for(int i=0; i<N; i++) {
        cin >> t >> s;
        m = (12*t)/1000;
        if((int)m < s.length()){
           n += s.length() - (int)m; 
           r += (int)m;
        }else{
           r += s.length();
        }
    }

    cout << r << " " << n << endl;
}
0