結果

問題 No.231 めぐるはめぐる (1)
ユーザー yagi2yagi2
提出日時 2017-04-21 11:12:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 204 ms / 1,000 ms
コード長 581 bytes
コンパイル時間 2,202 ms
コンパイル使用メモリ 71,576 KB
実行使用メモリ 57,872 KB
最終ジャッジ日時 2023-09-27 10:50:31
合計ジャッジ時間 5,336 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
56,528 KB
testcase_01 AC 162 ms
55,692 KB
testcase_02 AC 143 ms
55,940 KB
testcase_03 AC 129 ms
55,660 KB
testcase_04 AC 129 ms
55,832 KB
testcase_05 AC 186 ms
55,716 KB
testcase_06 AC 129 ms
55,816 KB
testcase_07 AC 154 ms
57,872 KB
testcase_08 AC 143 ms
56,048 KB
testcase_09 AC 129 ms
55,844 KB
testcase_10 AC 129 ms
56,140 KB
testcase_11 AC 127 ms
55,748 KB
testcase_12 AC 130 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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

        int D = Integer.parseInt(sc.next());

        boolean f = false;
        for (int i = 1; i <= D; i++) {
            if (sc.nextLong() - sc.nextInt() * 30000 >= 500000) {
                f = true;
                System.out.println("YES");
                System.out.printf("%d\n%d\n%d\n%d\n%d\n%d\n", i, i, i, i, i, i);
                break;
            }
        }
        if (!f) {
            System.out.println("NO");
        }
    }
}
0