結果

問題 No.35 タイパー高橋
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-11-09 15:10:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 255 ms / 5,000 ms
コード長 616 bytes
コンパイル時間 3,479 ms
コンパイル使用メモリ 75,932 KB
実行使用メモリ 61,120 KB
最終ジャッジ日時 2023-08-16 16:10:40
合計ジャッジ時間 5,234 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 252 ms
60,600 KB
testcase_01 AC 244 ms
61,120 KB
testcase_02 AC 252 ms
60,604 KB
testcase_03 AC 255 ms
60,552 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