結果

問題 No.35 タイパー高橋
ユーザー kotamanegikotamanegi
提出日時 2016-02-12 18:15:43
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 759 bytes
コンパイル時間 662 ms
コンパイル使用メモリ 81,084 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 02:37:13
合計ジャッジ時間 1,307 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <list>
#include <typeinfo>
using namespace std;
#define REP(a,b) for(long long a = 0;a < b;++a)
int main() {
	long long ans = 0,ans_2 = 0;
	int n;
	cin >> n;
	REP(i, n) {
		int a = 0;
		string hoge;
		cin >>a>> hoge;
		int can_be = (12 * a) / 1000;
		int sasa = hoge.length();
		if (sasa > can_be) {
			ans += can_be;
			ans_2 += sasa - can_be;
		}
		else {
			ans += sasa;
		}
	}
	cout << ans <<" "<<ans_2<< endl;
}
0