結果

問題 No.35 タイパー高橋
ユーザー delt
提出日時 2019-03-04 21:52:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 467 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 61,120 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 14:01:41
合計ジャッジ時間 916 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main(void){
  int n;
  cin >> n;
  int t[n];
  string s[n];
  for(int i = 0; i < n; i++) cin >> t[i] >> s[i];
  int c = 0;
  int m = 0;
  for(int i = 0; i < n; i++){
    int num = (12 * t[i]) / 1000;
    if(num >= s[i].length()) c += s[i].length();
    else{
      c += num;
      m += s[i].length() - num;
    }
  }
  cout << c << " " << m << endl;
  return 0;
}
0