結果

問題 No.2707 Bag of Words Encryption
ユーザー sysnote8main
提出日時 2024-04-11 22:21:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 74,552 KB
実行使用メモリ 54,604 KB
最終ジャッジ日時 2024-10-02 21:43:29
合計ジャッジ時間 5,689 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);sc.nextInt();
        int[] cnt = new int[26];
        for(char c: sc.next().toCharArray()) {
            cnt[(c - 'A')]++;
        }
        StringBuilder s = new StringBuilder();
        for(int i:cnt) {
            s.append(i);
        }
        System.out.println(s);
    }
}
0