結果

問題 No.504 ゲーム大会(ランキング)
コンテスト
ユーザー samplelpmas
提出日時 2017-04-27 20:16:10
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
WA  
実行時間 -
コード長 448 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,389 ms
コンパイル使用メモリ 81,616 KB
実行使用メモリ 52,728 KB
最終ジャッジ日時 2026-04-04 05:55:20
合計ジャッジ時間 5,821 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 1 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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();

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

            int scoreOthers = sc.nextInt();

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

        }

        System.out.println(rank);

    }

}
0