結果

問題 No.231 めぐるはめぐる (1)
ユーザー 練習生練習生
提出日時 2015-08-07 15:04:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 777 bytes
コンパイル時間 4,554 ms
コンパイル使用メモリ 72,020 KB
実行使用メモリ 59,104 KB
最終ジャッジ日時 2023-09-25 05:46:43
合計ジャッジ時間 7,994 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 194 ms
58,380 KB
testcase_01 AC 144 ms
56,056 KB
testcase_02 AC 140 ms
56,084 KB
testcase_03 WA -
testcase_04 AC 186 ms
58,504 KB
testcase_05 AC 181 ms
56,468 KB
testcase_06 WA -
testcase_07 AC 160 ms
56,064 KB
testcase_08 AC 185 ms
56,316 KB
testcase_09 AC 120 ms
56,152 KB
testcase_10 WA -
testcase_11 AC 120 ms
56,060 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No231 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean cleable = false;
		int[] arrayG = new int[n];
		//データ入力
		for(int i = 0; i < n; i++){
			int g = sc.nextInt();
			int d = sc.nextInt();
			//クリア可能かどうか判定
			if((g - 30000 * d) >= 500000){
				cleable = true;
				arrayG[i] = g - 30000 * d;
			}
		}
		sc.close();
		//判定
		if(!cleable){
			System.out.println("NO");
		}else{
			System.out.println("YES");			
			for(int i = 0; i < n; i ++){
				if(arrayG[i] < 500000){
					continue;
				}
				int keikenti = 0;
				while(keikenti < 3000000){
					keikenti += arrayG[i];
					System.out.println(i + 1);
				}
				break;
			}
		}
	}
}
0