結果

問題 No.35 タイパー高橋
ユーザー kou6839kou6839
提出日時 2014-11-18 16:49:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 319 ms / 5,000 ms
コード長 483 bytes
コンパイル時間 2,005 ms
コンパイル使用メモリ 74,128 KB
実行使用メモリ 62,664 KB
最終ジャッジ日時 2023-08-30 20:34:04
合計ジャッジ時間 4,066 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
62,600 KB
testcase_01 AC 296 ms
61,568 KB
testcase_02 AC 315 ms
62,664 KB
testcase_03 AC 319 ms
62,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n= sc.nextInt();
		int ok=0;
		int no=0;
		for(int i=0;i<n;i++){
			double temp=sc.nextDouble();
			String s =sc.next();
			int moji=s.length();
			if(Math.floor(temp*12/1000)>=moji){
				ok+=moji;
			}else{
				ok+=Math.floor(temp*12/1000);
				no+=moji-Math.floor(temp*12/1000);
			}
		}
		System.out.println(ok+" "+no);
	}
}	
0