結果

問題 No.231 めぐるはめぐる (1)
ユーザー GrenacheGrenache
提出日時 2015-06-26 22:30:49
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 824 bytes
コンパイル時間 3,422 ms
コンパイル使用メモリ 71,908 KB
実行使用メモリ 60,564 KB
最終ジャッジ日時 2023-09-22 00:50:22
合計ジャッジ時間 8,083 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 157 ms
55,836 KB
testcase_02 AC 148 ms
55,932 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 195 ms
55,988 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 128 ms
55,524 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder231 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] g = new int[n];
        int[] d = new int[n];
        int[] e = new int[n];
        for (int i = 0; i < n; i++) {
        	g[i] = sc.nextInt();
        	d[i] = sc.nextInt();
        	
        	e[i] = g[i] - 30000 * d[i];
        }

        int max = 0;
        int maxi = 0;
        for (int i = 0; i < n; i++) {
        	if (e[i] > max) {
        		max = e[i];
        		maxi = i + 1;
        	}
        }

        if (max * 6 >= 3000000) {
        	for (int i = 0; i < 6; i++) {
        		System.out.println(maxi);
        	}
        } else {
        	System.out.println("NO");
        }
        
        sc.close();
    }
}
0