結果

問題 No.35 タイパー高橋
ユーザー Kenichi Higashide
提出日時 2016-07-07 15:53:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 433 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 65,032 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 23:08:15
合計ジャッジ時間 937 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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