結果

問題 No.35 タイパー高橋
ユーザー @abcde
提出日時 2019-02-05 00:01:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 1,525 ms
コンパイル使用メモリ 159,864 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 05:56:52
合計ジャッジ時間 1,962 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. 入力情報取得.
    int N;
    cin >> N;

    // 2. 正解, 不正解 を集計.
    int correct = 0;
    int wrong = 0;
    for(int i = 0; i < N; i++){
        int t;
        string s;
        cin >> t >> s;
        int maxType = floor(12.0 * t / 1000);
        int l = s.size();
        if(l > maxType) correct += maxType, wrong += (l - maxType);
        else            correct += l;
    }

    // 3. 出力.
    cout << correct << " " << wrong << endl;
    return 0;
    
}
0