結果

問題 No.504 ゲーム大会(ランキング)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-04-21 22:27:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,128 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 3,941 ms
コンパイル使用メモリ 70,928 KB
実行使用メモリ 67,364 KB
最終ジャッジ日時 2023-09-27 11:16:47
合計ジャッジ時間 13,591 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,600 KB
testcase_01 AC 123 ms
55,772 KB
testcase_02 AC 128 ms
55,936 KB
testcase_03 AC 122 ms
55,800 KB
testcase_04 AC 127 ms
55,880 KB
testcase_05 AC 122 ms
56,072 KB
testcase_06 AC 135 ms
53,988 KB
testcase_07 AC 1,119 ms
67,364 KB
testcase_08 AC 1,068 ms
66,688 KB
testcase_09 AC 1,128 ms
67,148 KB
testcase_10 AC 1,093 ms
66,772 KB
testcase_11 AC 1,082 ms
66,596 KB
testcase_12 AC 1,035 ms
66,668 KB
testcase_13 AC 1,033 ms
65,828 KB
testcase_14 AC 1,095 ms
66,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int rank = 1;
        System.out.println(1);
        for(int i=1; i<N; i++){
            int tmp = sc.nextInt();
            if(tmp>A)rank++;
            System.out.println(rank);
        }
    }
}
0