結果

問題 No.35 タイパー高橋
ユーザー koarikoari
提出日時 2020-04-25 08:04:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 596 bytes
コンパイル時間 1,508 ms
コンパイル使用メモリ 162,072 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 05:51:42
合計ジャッジ時間 1,922 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define repi(i,a,b) for(ll (i)=(a);(i)<(b);(i)++)
#define SIZE_OF_ARRAY(array)    (sizeof(array)/sizeof(array[0]))
typedef long long ll;
using namespace std;
const ll mod = 1e9+7;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int n;
  cin >> n;
  int t;
  string s;
  int ans=0;
  int count=0;
  rep(i,n){
    cin >> t >> s;
    int m = (12*t)/1000;
    if(m>=s.size()){
      ans+=s.size();
    }else{
      ans+=m;
      count+=(s.size()-m);
    }
  }

  printf("%d %d\n",ans,count);
  
  return 0;
  }
0