結果

問題 No.35 タイパー高橋
ユーザー jimanojimano
提出日時 2018-01-13 18:49:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 209 ms / 5,000 ms
コード長 518 bytes
コンパイル時間 3,460 ms
コンパイル使用メモリ 73,852 KB
実行使用メモリ 60,700 KB
最終ジャッジ日時 2023-08-25 15:58:21
合計ジャッジ時間 4,931 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 205 ms
59,992 KB
testcase_01 AC 192 ms
60,700 KB
testcase_02 AC 200 ms
60,236 KB
testcase_03 AC 209 ms
59,972 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 sumUnTyped = 0;

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

				int cnt = (12 * T / 1000);
				int mod = S - cnt;
				sumTyped += Math.min(cnt, S);
				sumUnTyped += (mod > 0) ? mod : 0;
			}

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