結果

問題 No.35 タイパー高橋
ユーザー AuroraAurora
提出日時 2022-05-11 11:10:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 1,735 ms
コンパイル使用メモリ 165,120 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 22:49:18
合計ジャッジ時間 1,999 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main(){
  int N,ans1=0,ans2=0;
  cin >> N;
  for(int i=0;i<N;i++){
    int m;
    string S;
    cin >> m >> S;
    int T = S.size();
    int can = (12*m)/1000;
    if(can >= T) ans1 += T;
    else{
      ans1 += can;
      ans2 += T-can;
    }
  }
  cout << ans1 << " " << ans2 << endl;
}
0