結果

問題 No.231 めぐるはめぐる (1)
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-30 17:47:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,109 bytes
コンパイル時間 4,104 ms
コンパイル使用メモリ 73,468 KB
実行使用メモリ 51,548 KB
最終ジャッジ日時 2023-10-11 23:51:08
合計ジャッジ時間 4,934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 60 ms
50,392 KB
testcase_04 AC 77 ms
51,548 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 42 ms
49,340 KB
testcase_10 AC 43 ms
49,272 KB
testcase_11 AC 43 ms
49,188 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.System.in;


public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int N = Integer.parseInt(reader.readLine());
        long REQUIRED_XP = 3000000;
        String[] inputs;
        long[] xps = new long[N];
        for (int i = 0; i < N; i++) {
            inputs = reader.readLine().split(" ");
            long xp = Long.parseLong(inputs[0]);
            int death = Integer.parseInt(inputs[1]);
            xps[i] = xp * 6 - 30000 * death;
        }
        int dangeon = -1;
        for (int i = 0; i < N; i++) {
            if(REQUIRED_XP <= xps[i]) {
                dangeon = i;
                break;
            }
        }
        if(dangeon!=-1){
            System.out.println("YES");
            for (int i = 0; i < 6; i++) {
                System.out.println(dangeon+1);
            }
        } else {
            System.out.println("NO");
        }
    }
}

0