結果

問題 No.231 めぐるはめぐる (1)
ユーザー spaciaspacia
提出日時 2016-01-04 08:34:29
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 727 bytes
コンパイル時間 2,294 ms
コンパイル使用メモリ 75,348 KB
実行使用メモリ 54,800 KB
最終ジャッジ日時 2023-10-19 14:59:07
合計ジャッジ時間 5,615 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 59 ms
53,460 KB
testcase_02 AC 59 ms
52,584 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 65 ms
54,048 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 56 ms
53,432 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main {
	
	public static void out (Object o) {
		System.out.println(o);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		int maxExp = -1 , maxId = -1;
		
		for (int i = 0; i < n; i++) {
			String[] line = br.readLine().split(" ");
			int g = Integer.parseInt(line[0]);
			int d = Integer.parseInt(line[1]);
			int exp = g - d * 30000;
			if (exp > maxExp) {
				maxExp = exp;
				maxId = i + 1;
			}
		}
		
		if (maxExp * 6 >= 3000000) {
			for (int i = 0; i < 6; i++) out(maxId);
		} else {
			out("NO");
		}
		
	}
}
0