結果

問題 No.231 めぐるはめぐる (1)
ユーザー samplelpmas
提出日時 2017-01-23 22:44:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 179 ms / 1,000 ms
コード長 724 bytes
コンパイル時間 2,172 ms
コンパイル使用メモリ 74,192 KB
実行使用メモリ 43,512 KB
最終ジャッジ日時 2024-12-23 07:44:09
合計ジャッジ時間 4,949 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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