結果

問題 No.35 タイパー高橋
ユーザー kaito_tateyama
提出日時 2017-08-07 14:31:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 56,740 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-11 22:20:14
合計ジャッジ時間 992 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {


  int n,sum,fault;
  cin >> n;
  sum = 0;
  fault = 0;
  for (int i = 0; i < n; i++) {
    int t;
    string s;
    cin >> t >> s;
    int ctype,stype;
    ctype = (12 * t) / 1000;
    stype = s.size();
    if (ctype >= stype) {
      sum += stype;
    }else{
      sum += ctype;
      fault += stype - ctype;
    }
    
  }
  cout << sum << " " << fault << "\n";
  return 0;
}
0