結果

問題 No.35 タイパー高橋
ユーザー 0w10w1
提出日時 2016-11-20 10:58:40
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 1,466 ms
コンパイル使用メモリ 167,960 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-05 10:39:07
合計ジャッジ時間 1,759 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

signed main(){
  int N; cin >> N;
  int acnt = 0, bcnt = 0;
  for( int i = 0; i < N; ++i ){
    int M; cin >> M;
    string S; cin >> S;
    acnt += min( ( int ) S.size(), 12 * M / ( int ) S.size() );
    bcnt += max( 0, ( int ) S.size() - 12 * M / ( int ) S.size() );
  }
  cout << acnt << " " << bcnt << endl;
  return 0;
}
0