結果

問題 No.35 タイパー高橋
ユーザー kazuppa
提出日時 2024-07-25 21:58:47
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 376 bytes
コンパイル時間 4,453 ms
コンパイル使用メモリ 274,048 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-07-25 21:58:53
合計ジャッジ時間 4,380 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int floor(int x, int m) {
  int r=(x%m+m)%m;
  return (x-r)/m;
}

int main(){
  int n,ok=0,ng=0;cin>>n;
  //ok=打てるタイプ数、ng=取り逃すタイプ数
  for(int i=0;i<n;i++){
    int t;string s;cin>>t>>s;
    int e=min(floor(t*12,1000),(int)(s.size()));
    ok+=e;
    ng+=s.size()-e;
  }
  cout<<ok<<" "<<ng<<endl;
}
0