結果

問題 No.35 タイパー高橋
ユーザー satanic
提出日時 2015-11-28 20:25:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 60,288 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 04:57:44
合計ジャッジ時間 892 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <math.h>
using namespace std;

int main(){
  int n;
  int time;
  string str;
  int typableLen, typableNum=0, missNum=0;
  
  cin >> n;
  for(int i=0; i<n; ++i){
    cin >> time >> str;
    typableLen = floor((12*time)/1000);
    if((signed)(typableLen-str.length()) >= 0){
      typableNum+=str.length();
    }else{
      typableNum+=typableLen;
      missNum+=str.length()-typableLen;
    }
  }
  cout << typableNum << " " << missNum << endl;

  return 0;
}
0