結果

問題 No.35 タイパー高橋
ユーザー KUSAKA GenKUSAKA Gen
提出日時 2018-02-24 10:59:53
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 57,164 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-21 00:26:40
合計ジャッジ時間 933 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main()
{
	int N;
	int T;
	string S;
	double type_speed = 12 / 1000.0;
	int sum = 0, correct = 0, miss = 0;

	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		cin >> T >> S;

		sum += S.length();
		correct += (S.length() < type_speed * T) ? S.length() : type_speed * T;
	}
	miss = sum - correct;

	cout << correct << ' ' << miss << endl;

	return 0;
}
0