結果

問題 No.35 タイパー高橋
ユーザー uafr_csuafr_cs
提出日時 2015-05-10 20:26:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 247 ms / 5,000 ms
コード長 522 bytes
コンパイル時間 3,639 ms
コンパイル使用メモリ 79,812 KB
実行使用メモリ 61,064 KB
最終ジャッジ日時 2023-09-20 01:40:16
合計ジャッジ時間 5,755 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 231 ms
60,788 KB
testcase_01 AC 226 ms
61,064 KB
testcase_02 AC 246 ms
59,412 KB
testcase_03 AC 247 ms
60,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		
		int ok = 0, miss = 0;
		for(int i = 0; i < N; i++){
			final int T = sc.nextInt();
			final String S = sc.next();
			
			final int can_type = 12 * T / 1000;
			
			ok += Math.min(can_type, S.length());
			miss += Math.max(S.length() - can_type, 0);
		}
		
		System.out.println(ok + " " + miss);
	}
	
}
0