結果

問題 No.35 タイパー高橋
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 05:03:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 245 ms / 5,000 ms
コード長 597 bytes
コンパイル時間 2,390 ms
コンパイル使用メモリ 85,172 KB
実行使用メモリ 61,348 KB
最終ジャッジ日時 2023-08-16 18:18:53
合計ジャッジ時間 4,044 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 235 ms
61,068 KB
testcase_01 AC 234 ms
60,432 KB
testcase_02 AC 242 ms
60,412 KB
testcase_03 AC 245 ms
61,348 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 suc = 0;
        int miss = 0;
        for(int i=0; i<N; i++){
            int a = sc.nextInt();
            int type = 12*a/1000;
            String s = sc.next();
            int b = s.length() ;
            if(type>=b){
                suc = suc + b;
            }else{
                suc = suc + type;
                miss = miss + (b-type);
            }
        }
        System.out.println(suc + " " + miss);
    }
}
0