結果

問題 No.35 タイパー高橋
ユーザー Respect2DRespect2D
提出日時 2014-11-21 01:34:56
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 399 bytes
コンパイル時間 2,126 ms
コンパイル使用メモリ 60,376 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-30 22:05:30
合計ジャッジ時間 964 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;

int main(){
  int n;

  while(cin >> n){
    int sum = 0;
    int x = 0;

    for(int i = 0; i < n; i++){
      int t;
      string s;
      cin >> t >> s;

      sum += s.size();

      int calc = floor(t * 12.0 / 1000.0);
      x += min(calc, (int)s.size());
    }

    cout << x << " " << sum - x << endl;
  }
}
0