結果

問題 No.35 タイパー高橋
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 14:17:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 239 ms / 5,000 ms
コード長 489 bytes
コンパイル時間 2,264 ms
コンパイル使用メモリ 73,924 KB
実行使用メモリ 61,608 KB
最終ジャッジ日時 2023-10-11 12:37:07
合計ジャッジ時間 3,701 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 231 ms
60,748 KB
testcase_01 AC 233 ms
61,608 KB
testcase_02 AC 238 ms
60,456 KB
testcase_03 AC 239 ms
60,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int correct = 0;
		int wrong = 0;
		for (int i=0; i<n; i++) {
			int time = sc.nextInt();
			int length = sc.next().length();
			int typeNum = 12 * time / 1000;
			
			if (typeNum >= length) {
				correct += length;
			}
			else {
				correct += typeNum;
				wrong += length - typeNum;
			}
		}
		System.out.println(correct+" "+wrong);

	}
}
0