結果

問題 No.35 タイパー高橋
ユーザー jimanojimano
提出日時 2018-01-13 18:52:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 244 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 3,388 ms
コンパイル使用メモリ 74,080 KB
実行使用メモリ 61,096 KB
最終ジャッジ日時 2023-08-25 15:58:36
合計ジャッジ時間 5,093 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 239 ms
61,000 KB
testcase_01 AC 235 ms
61,096 KB
testcase_02 AC 244 ms
60,892 KB
testcase_03 AC 241 ms
60,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;
import java.util.Scanner;

public class No0035 {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int sumTyped = 0;
			int sumAll = 0;

			for (int i = 0; i < N; i++) {
				int T = sc.nextInt();
				int S = sc.next().length();

				sumTyped += Math.min((12 * T / 1000), S);
				sumAll += S;
			}

			System.out.println(sumTyped + " " + (sumAll - sumTyped));
		}
	}
}
0