結果

問題 No.504 ゲーム大会(ランキング)
ユーザー samplelpmassamplelpmas
提出日時 2017-04-27 20:20:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,117 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 4,536 ms
コンパイル使用メモリ 71,204 KB
実行使用メモリ 67,048 KB
最終ジャッジ日時 2023-10-11 16:09:19
合計ジャッジ時間 15,486 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,984 KB
testcase_01 AC 126 ms
55,976 KB
testcase_02 AC 126 ms
55,864 KB
testcase_03 AC 125 ms
55,804 KB
testcase_04 AC 127 ms
55,944 KB
testcase_05 AC 127 ms
55,724 KB
testcase_06 AC 125 ms
55,856 KB
testcase_07 AC 1,103 ms
66,468 KB
testcase_08 AC 1,083 ms
66,676 KB
testcase_09 AC 1,090 ms
66,756 KB
testcase_10 AC 1,080 ms
67,048 KB
testcase_11 AC 1,081 ms
66,624 KB
testcase_12 AC 1,043 ms
66,888 KB
testcase_13 AC 1,044 ms
65,900 KB
testcase_14 AC 1,117 ms
66,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int rank = 1;

        int scoreK = sc.nextInt();

        System.out.println(rank);

        for (int i = 1; i < n; i++) {

            int scoreOthers = sc.nextInt();

            if (scoreOthers > scoreK) {
                rank++;
            }

            System.out.println(rank);

        }

    }

}
0