結果
| 問題 | No.504 ゲーム大会(ランキング) | 
| コンテスト | |
| ユーザー |  Tsukasa_Type | 
| 提出日時 | 2018-02-11 00:35:36 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1,198 ms / 2,000 ms | 
| コード長 | 415 bytes | 
| コンパイル時間 | 2,113 ms | 
| コンパイル使用メモリ | 74,668 KB | 
| 実行使用メモリ | 69,540 KB | 
| 最終ジャッジ日時 | 2024-11-06 19:22:12 | 
| 合計ジャッジ時間 | 13,417 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 13 | 
ソースコード
import java.util.*;
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int rank = 1;
		int score = 0;
		for (int i=0; i<n; i++) {
			if (i==0) {
				score = sc.nextInt();
				System.out.println(rank);
			}
			else {
				if (score < sc.nextInt()) {rank++; System.out.println(rank);}
				else {System.out.println(rank);}
			}
		}
	}
}
            
            
            
        