結果

問題 No.35 タイパー高橋
ユーザー daradara_sanmadaradara_sanma
提出日時 2017-06-30 21:19:08
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 56,764 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-15 05:53:05
合計ジャッジ時間 1,029 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main() {
	int n;
	cin >> n;

	int c = 0, m = 0;
	for (int i = 0; i < n; i++)
	{
		int t;
		string str;
		cin >> t >> str;

		int max_type = 12 * t / 1000;
		if (str.length() < max_type)
		{
			c += str.length();
		}
		else
		{
			c += max_type;
			m += str.length() - max_type;
		}
	}
	cout << c << " " << m << endl;

	return 0;
}
0