結果

問題 No.35 タイパー高橋
ユーザー shimashima_kshimashima_k
提出日時 2015-04-26 15:45:58
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 59,720 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-18 11:47:20
合計ジャッジ時間 895 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,376 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 4 ms
4,376 KB
testcase_03 AC 4 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:18: warning: ‘l’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     cout << l << " " << o - l  << endl;
                  ^~~

ソースコード

diff #

#include "iostream"
#include "algorithm"
using namespace std;
int main(){
    int n,l,o=0;
    double m;
    string a;
    cin>>n;
    while(n--) {
        cin>>m>>a;
        m*=0.012;
        l += min(m, a.length() - 0.0);
        o += a.length();
    }
    cout << l << " " << o - l  << endl;
    return 0;
}
0