結果

問題 No.231 めぐるはめぐる (1)
ユーザー samplelpmassamplelpmas
提出日時 2017-01-23 22:44:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 177 ms / 1,000 ms
コード長 724 bytes
コンパイル時間 1,813 ms
コンパイル使用メモリ 74,312 KB
実行使用メモリ 43,488 KB
最終ジャッジ日時 2024-06-02 10:53:48
合計ジャッジ時間 4,758 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 177 ms
43,488 KB
testcase_01 AC 147 ms
41,660 KB
testcase_02 AC 131 ms
41,944 KB
testcase_03 AC 175 ms
42,760 KB
testcase_04 AC 174 ms
43,124 KB
testcase_05 AC 169 ms
41,996 KB
testcase_06 AC 172 ms
42,616 KB
testcase_07 AC 140 ms
41,480 KB
testcase_08 AC 163 ms
42,072 KB
testcase_09 AC 115 ms
41,348 KB
testcase_10 AC 105 ms
39,860 KB
testcase_11 AC 102 ms
40,100 KB
testcase_12 AC 172 ms
42,908 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