結果

問題 No.35 タイパー高橋
ユーザー shimashima_k
提出日時 2015-04-26 15:45:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 310 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 58,820 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 02:49:26
合計ジャッジ時間 798 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:18: warning: ‘l’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   15 |     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