結果

問題 No.35 タイパー高橋
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-29 00:58:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 620 bytes
コンパイル時間 2,887 ms
コンパイル使用メモリ 75,172 KB
実行使用メモリ 55,140 KB
最終ジャッジ日時 2023-08-14 09:03:34
合計ジャッジ時間 4,008 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
54,784 KB
testcase_01 AC 123 ms
54,532 KB
testcase_02 AC 137 ms
55,140 KB
testcase_03 AC 133 ms
55,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No35 {
	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int inputComp = 0; int inputUncomp = 0;
		for(int i=0; i < n; i++){
			String[] str = br.readLine().split(" ");
			int t = Integer.parseInt(str[0]);
			int temp = Math.min((12*t)/1000, str[1].length());
			inputUncomp += str[1].length() - temp;
			inputComp += temp;
		}
		System.out.println(inputComp +" "+ inputUncomp);
	}
}
0