結果

問題 No.35 タイパー高橋
ユーザー forest3forest3
提出日時 2020-03-19 16:14:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 321 bytes
コンパイル時間 2,066 ms
コンパイル使用メモリ 165,640 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-20 20:54:18
合計ジャッジ時間 1,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,380 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 3 ms
4,380 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