結果

問題 No.35 タイパー高橋
ユーザー HEGO55HEGO55
提出日時 2017-05-21 01:15:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 260 ms / 5,000 ms
コード長 635 bytes
コンパイル時間 2,307 ms
コンパイル使用メモリ 85,768 KB
実行使用メモリ 62,624 KB
最終ジャッジ日時 2023-10-19 04:17:34
合計ジャッジ時間 3,986 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 250 ms
62,140 KB
testcase_01 AC 251 ms
61,656 KB
testcase_02 AC 259 ms
62,624 KB
testcase_03 AC 260 ms
62,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class No35{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		double[] second = new double[N];
		String[] str = new String[N];
		long strLength = 0;
		long actualStr = 0;
		
		for(int i=0; i<N; i++){
			second[i] = sc.nextInt();
			str[i] = sc.next();
			strLength += str[i].length();
		}
		
		for(int j=0; j<N; j++){
			long Naruheso = (long)Math.floor(12*(second[j]/1000));
			if(Naruheso > str[j].length()){
				actualStr += str[j].length();
			}else{
				actualStr += Naruheso;
			}
		}
	    System.out.println(actualStr+" "+(strLength - actualStr));
	}
}
0