結果

問題 No.35 タイパー高橋
ユーザー d_seid_sei
提出日時 2019-08-30 15:40:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 727 ms
コンパイル使用メモリ 78,640 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-05-01 08:13:36
合計ジャッジ時間 1,109 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
#include<iomanip>
using namespace std;
typedef long long int lont;
int main() {
	int N, T;
	string S;
	int Z = 0;
	int a = 0;
	int b = 0;
	int sa = 0;
	int sb = 0;

	cin >> N;

	for (int ia = 0; ia < N; ia++) {
		cin >> T >> S;
		Z = S.size();
		a = min(12 * T / 1000, Z);
		b = Z - a;
		sa += a;
		sb += b;
	}

	cout << sa << ' ' << sb << endl;
}
0