結果

問題 No.35 タイパー高橋
ユーザー jajagacchijajagacchi
提出日時 2017-01-11 23:46:29
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 405 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 52,196 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-23 08:33:16
合計ジャッジ時間 1,071 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

int main()
{
	int N; std::cin >> N;
	std::pair<int, int> ans;
	ans.first = ans.second = 0;

	for(int n=0; n<N; n++)
	{
		int T; std::cin >> T;
		std::string S; std::cin >> S;
		int L = S.size();
		ans.first += (L<=(12*T)/1000 ? L : (12*T)/1000);
		ans.second += S.size();
	}
	ans.second = ans.second - ans.first;
	std::cout << ans.first << " " << ans.second << std::endl;
	return 0;
}
0