結果

問題 No.35 タイパー高橋
ユーザー sggkshiosggkshio
提出日時 2016-08-15 12:58:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 503 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 81,684 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 07:21:43
合計ジャッジ時間 1,181 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>


using namespace std;



int main(){
	int y=0;int t=0;
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a;
		string b;
		cin>>a>>b;
		int g=a*12;
		g/=1000;
		y+=min(g,(int)b.size());
		t+=b.size();
	}
	cout<<y<<" "<<t-y<<endl;
	return 0;
}
	
	


	
0