結果
問題 |
No.504 ゲーム大会(ランキング)
|
ユーザー |
![]() |
提出日時 | 2019-11-17 19:32:07 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 682 ms / 2,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 2,307 ms |
コンパイル使用メモリ | 74,180 KB |
実行使用メモリ | 59,840 KB |
最終ジャッジ日時 | 2024-09-25 06:03:40 |
合計ジャッジ時間 | 9,634 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
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); } }