結果

問題 No.35 タイパー高橋
ユーザー spaciaspacia
提出日時 2016-01-02 07:43:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 643 bytes
コンパイル時間 4,228 ms
コンパイル使用メモリ 75,072 KB
実行使用メモリ 57,804 KB
最終ジャッジ日時 2023-10-19 13:29:26
合計ジャッジ時間 4,795 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
57,264 KB
testcase_01 AC 133 ms
57,392 KB
testcase_02 AC 149 ms
57,012 KB
testcase_03 AC 142 ms
57,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main35 {
	
	public static void out (Object o) {
		System.out.println(o);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int ans1 = 0;
		int ans2 = 0;
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String[] line = br.readLine().split(" ");
			int t = Integer.parseInt(line[0]);
			int typeStr = 12 * t / 1000;
			int len = line[1].length();
			ans1 += Math.min(typeStr , len);
			ans2 += len > typeStr ? len - typeStr : 0;
		}
		
		out(ans1 + " " + ans2);
		
	}
}
0