結果

問題 No.35 タイパー高橋
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-11-09 15:10:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 243 ms / 5,000 ms
コード長 616 bytes
コンパイル時間 3,152 ms
コンパイル使用メモリ 76,120 KB
実行使用メモリ 47,128 KB
最終ジャッジ日時 2024-05-04 00:16:06
合計ジャッジ時間 4,774 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 241 ms
46,688 KB
testcase_01 AC 243 ms
46,508 KB
testcase_02 AC 236 ms
45,872 KB
testcase_03 AC 238 ms
47,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class No_035 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		double ToET = 1000.0 / 12.0;//Time of each typeing
		int ST = 0;//Succeeded typeing
		int FT = 0; //Failed typeing
		for(int i = 0; i < N; i++){
			int time = sc.nextInt();
			String s = sc.nextLine();
			int NoT = (int)Math.floor(time / ToET);//Number of times
			int VoL = s.length() - 1;//Value of Letter
			if(VoL > NoT){
				ST += NoT;
				FT += (VoL - NoT);
			}else{
				ST += VoL;
			}
		}
		System.out.println(ST + " " + FT);
	}
}
0