結果

問題 No.35 タイパー高橋
ユーザー Kenichi HigashideKenichi Higashide
提出日時 2016-07-07 15:53:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 433 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 65,068 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-21 00:48:51
合計ジャッジ時間 936 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main(int argc, char* argv[])
{
	int n;
	cin >> n;
	int typed = 0;
	int notTyped = 0;
	for (int i = 0; i < n; ++i) {
		int t;
		string s;
		cin >> t >> s;
		int typable = 12 * t / 1000;
		if (typable >= s.size()) {
			typed += s.size();
		} else {
			typed += typable;
			notTyped += s.size() - typable;
		}
	}
	cout << typed << " " << notTyped << endl;


	return 0;
}
0