結果

問題 No.35 タイパー高橋
ユーザー haruharu
提出日時 2021-04-08 16:15:23
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 1,511 ms
コンパイル使用メモリ 164,500 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-06 00:19:24
合計ジャッジ時間 1,933 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=k;i<(ll)(n);i++)
#define fore(i,a) for(auto &i:a)
using namespace std;
using ll = long long; 


int main() {
	int n;
	cin >> n;
	int t;
	string s;
	int ok = 0;
	int ng = 0;
	rep(i,n) {
		int o = 0;
		int x = 0;
		cin >> t >> s;
		if((12*t/1000) >= s.size()) {
			o += s.size();
		} else {
			o += 12*t/1000;
			x += s.size() - o;
		}
		ok += o;
		ng += x;
	}
	cout << ok << " " << ng << endl;
	return 0;
}
0