結果

問題 No.504 ゲーム大会(ランキング)
ユーザー htensaihtensai
提出日時 2019-11-17 19:32:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 691 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 2,948 ms
コンパイル使用メモリ 74,840 KB
実行使用メモリ 63,792 KB
最終ジャッジ日時 2023-10-25 21:22:20
合計ジャッジ時間 10,554 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
56,196 KB
testcase_01 AC 140 ms
57,288 KB
testcase_02 AC 142 ms
57,668 KB
testcase_03 AC 142 ms
57,116 KB
testcase_04 AC 142 ms
57,244 KB
testcase_05 AC 145 ms
57,308 KB
testcase_06 AC 143 ms
57,188 KB
testcase_07 AC 688 ms
63,132 KB
testcase_08 AC 691 ms
63,448 KB
testcase_09 AC 669 ms
63,792 KB
testcase_10 AC 659 ms
63,588 KB
testcase_11 AC 668 ms
63,628 KB
testcase_12 AC 578 ms
62,136 KB
testcase_13 AC 566 ms
63,436 KB
testcase_14 AC 635 ms
63,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
 	public static void main (String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int order = 1;
		int score = sc.nextInt();
		StringBuilder sb = new StringBuilder();
		sb.append(order).append("\n");
		for (int i = 0; i < n - 1; i++) {
		    if (score < sc.nextInt()) {
		        order++;
		    }
		    sb.append(order).append("\n");
		}
		System.out.print(sb);
	}
}


0