結果

問題 No.35 タイパー高橋
ユーザー satanicsatanic
提出日時 2015-11-28 20:25:04
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 58,424 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-12 05:30:05
合計ジャッジ時間 993 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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