結果

問題 No.35 タイパー高橋
ユーザー dgd1724dgd1724
提出日時 2016-09-12 18:19:36
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 600 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 72,908 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-10 19:12:49
合計ジャッジ時間 1,139 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <cmath>
#include <fstream>
#include <iomanip>

int main(void) {

	//test用
	//std::ifstream in("test.txt");
	//std::cin.rdbuf(in.rdbuf());

	int N;
	std::cin >> N;

	int score = 0;
	int miss = 0;

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

		int temp = T * 12 / 1000;
		if (temp >= S.length()) {
			score += S.length();
		}
		else {
			score += temp;
			miss += S.length() - temp;
		}
	}

	std::cout << score << " " << miss << std::endl;
}
0