結果

問題 No.35 タイパー高橋
ユーザー shinwisteriashinwisteria
提出日時 2018-03-04 16:34:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 231 ms / 5,000 ms
コード長 461 bytes
コンパイル時間 3,240 ms
コンパイル使用メモリ 73,164 KB
実行使用メモリ 61,668 KB
最終ジャッジ日時 2023-09-22 09:05:12
合計ジャッジ時間 4,988 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 223 ms
60,072 KB
testcase_01 AC 223 ms
61,668 KB
testcase_02 AC 231 ms
61,356 KB
testcase_03 AC 229 ms
61,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con35 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt() , ok = 0 , batsu = 0;

		for(int i = 0;i < N;i++){
			int T = s.nextInt();
			String str = s.next();
			T = 12 * T / 1000;
			if(T >= str.length()){
				ok += str.length();
			}else{
				ok += T;
				batsu += str.length()-T;
			}
		}
		s.close();

		System.out.println(ok + " " + batsu);

	}

}
0