結果

問題 No.35 タイパー高橋
ユーザー msm1993msm1993
提出日時 2020-03-22 12:56:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 321 bytes
コンパイル時間 1,520 ms
コンパイル使用メモリ 164,188 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-26 03:38:02
合計ジャッジ時間 1,909 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main()
{
	int N;
	cin >> N;
	int ans1 = 0, ans2 = 0;
	for( int i = 0; i < N; i++ ) {
		int T;
		string S;
		cin >> T >> S;
		int N = S.size();
		int ok = min( T * 12 / 1000, N );
		int ng = N - ok;
		ans1 += ok;
		ans2 += ng;
	}

	cout << ans1 << " " << ans2 << endl;
}
0