結果

問題 No.35 タイパー高橋
ユーザー mannshi222
提出日時 2022-04-25 22:40:43
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 920 ms
コンパイル使用メモリ 70,960 KB
最終ジャッジ日時 2025-01-28 21:52:59
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
	int N, T;
	string S;
	cin >> N;
	int ok = 0;
	int ng = 0;
	int t, s;
	for( int i = 0; i < N; i++ ) {
		cin >> T >> S;
		t = ( T * 12 ) / 1000;
		s = S.size();

		ok += min( t, s) ;
		ng += max( s - t, 0 );
	}
	cout << ok << " " << ng << endl;
	return 0;
}
0