結果

問題 No.35 タイパー高橋
ユーザー r2en_
提出日時 2017-04-06 22:46:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 527 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 65,588 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-17 21:42:12
合計ジャッジ時間 820 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main(){
    int A = 0; int B = 0; double good = 0; double bad = 0;
    int N = 0; int t = 0; string s;
    cin >> N;
    for(int i = 0; i < N; ++i){
        cin >> t >> s;
        A = t * 12;
        B = s.size() * 1000; //cout << A << " " << B << endl;
        if(A > B||A == B){ good += s.size(); }
        else if(A < B){ bad += s.size()-(12*t/1000); good += 12*t/1000; }
        //cout << good << " " << bad << endl;
    }
    cout << good << " " << bad << endl;
    return 0;
}
0