結果

問題 No.231 めぐるはめぐる (1)
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 17:06:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 203 ms / 1,000 ms
コード長 466 bytes
コンパイル時間 3,988 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 57,064 KB
最終ジャッジ日時 2024-04-27 15:36:40
合計ジャッジ時間 6,673 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
57,064 KB
testcase_01 AC 168 ms
54,240 KB
testcase_02 AC 155 ms
54,384 KB
testcase_03 AC 193 ms
54,252 KB
testcase_04 AC 203 ms
56,556 KB
testcase_05 AC 190 ms
54,140 KB
testcase_06 AC 196 ms
54,464 KB
testcase_07 AC 168 ms
54,456 KB
testcase_08 AC 191 ms
54,860 KB
testcase_09 AC 135 ms
54,340 KB
testcase_10 AC 130 ms
53,840 KB
testcase_11 AC 135 ms
54,196 KB
testcase_12 AC 193 ms
54,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		int req = 3000000, n = sc.nextInt(), max = 0, g, d;
		for(int i = 1; i <= n; i++){
			g = sc.nextInt();
			d = sc.nextInt();
			if((g-30000*d)*6 >= req){
				max = i;
			}
		}
		if(max == 0){
			System.out.println("NO");
		} else {
			System.out.println("YES");
			for(int i = 0; i < 6; i++){
				System.out.println(max);
			}
		}
	}
}
0