結果

問題 No.35 タイパー高橋
ユーザー kotamanegi
提出日時 2016-02-12 18:15:43
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 759 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 81,404 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 04:12:53
合計ジャッジ時間 1,225 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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