結果

問題 No.504 ゲーム大会(ランキング)
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-04 07:37:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 624 ms / 2,000 ms
コード長 692 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 71,680 KB
実行使用メモリ 62,568 KB
最終ジャッジ日時 2023-10-12 06:04:36
合計ジャッジ時間 8,492 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,256 KB
testcase_01 AC 45 ms
49,368 KB
testcase_02 AC 45 ms
47,276 KB
testcase_03 AC 45 ms
49,092 KB
testcase_04 AC 46 ms
49,368 KB
testcase_05 AC 46 ms
49,116 KB
testcase_06 AC 45 ms
49,196 KB
testcase_07 AC 621 ms
62,532 KB
testcase_08 AC 623 ms
62,540 KB
testcase_09 AC 615 ms
62,556 KB
testcase_10 AC 607 ms
62,452 KB
testcase_11 AC 622 ms
62,400 KB
testcase_12 AC 616 ms
62,548 KB
testcase_13 AC 594 ms
61,912 KB
testcase_14 AC 624 ms
62,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int N = Integer.parseInt(reader.readLine());
        int rankK = 1;
        int scoreK = Integer.parseInt(reader.readLine());;
        System.out.println(rankK);
        for (int i = 1; i < N; i++) {
            int score = Integer.parseInt(reader.readLine());
            if(scoreK < score) {
                rankK+=1;
            }
            System.out.println(rankK);
        }

    }
}
0