結果

問題 No.35 タイパー高橋
ユーザー OnjuOnju
提出日時 2015-02-15 11:16:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 414 bytes
コンパイル時間 873 ms
コンパイル使用メモリ 60,204 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-06 01:14:54
合計ジャッジ時間 822 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cstring>
#include <climits>
#include <string>
using namespace std;

int main()
{
	int N, T, ok = 0, ng = 0;
	string S;
	cin >> N;

	for (int i = 0; i < N; ++i)
	{
		cin >> T >> S;
		int can = T * 12.0 / 1000;
		int len = S.size();
		if (can >= len)
			ok += len;
		else
		{
			ok += can;
			ng += len - can;
		}
	}

	cout << ok << " " << ng << endl;

	return 0;
}
0