結果

問題 No.2092 Conjugation
ユーザー viral8
提出日時 2022-10-07 22:24:37
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 2,014 ms
コンパイル使用メモリ 74,824 KB
実行使用メモリ 71,684 KB
最終ジャッジ日時 2024-06-12 19:19:04
合計ジャッジ時間 14,052 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 2 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] sum = new int[(int)1e5+1];
        while(N-->0){
            int A = sc.nextInt();
            sum[A]++;
        }
        for(int i=(int)1e5-1;i>0;i--){
            sum[i] += sum[i+1];
        }
        int p = 1;
        while(p<=1e5){
            if(sum[p]==0)
                break;
            System.out.println(sum[p++]);
        }
    }
}
0