結果

問題 No.231 めぐるはめぐる (1)
ユーザー samplelpmassamplelpmas
提出日時 2017-01-23 22:44:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 193 ms / 1,000 ms
コード長 724 bytes
コンパイル時間 1,889 ms
コンパイル使用メモリ 71,804 KB
実行使用メモリ 58,928 KB
最終ジャッジ日時 2023-08-24 21:37:17
合計ジャッジ時間 5,441 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 193 ms
58,412 KB
testcase_01 AC 157 ms
55,952 KB
testcase_02 AC 138 ms
55,924 KB
testcase_03 AC 186 ms
58,928 KB
testcase_04 AC 188 ms
58,400 KB
testcase_05 AC 172 ms
56,232 KB
testcase_06 AC 186 ms
58,076 KB
testcase_07 AC 152 ms
56,232 KB
testcase_08 AC 171 ms
56,208 KB
testcase_09 AC 123 ms
55,964 KB
testcase_10 AC 122 ms
56,004 KB
testcase_11 AC 121 ms
56,044 KB
testcase_12 AC 184 ms
56,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int dungeon = sc.nextInt();

        int max = 0;

        for (int i = 1; i <= dungeon; i++) {

            int gain = sc.nextInt();
            int death = sc.nextInt();

            int experiencePoint = (gain - 30000 * death) * 6;

            if (30000 * 100 <= experiencePoint) {
                max = i;
            }

        }

        if (max != 0) {

            System.out.println("YES");

            for (int i = 0; i < 6; i++){
                System.out.println(max);
            }

        } else {

            System.out.println("NO");

        }

    }

}
0