結果

問題 No.2707 Bag of Words Encryption
ユーザー sysnote8mainsysnote8main
提出日時 2024-04-11 22:21:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 2,155 ms
コンパイル使用メモリ 74,532 KB
実行使用メモリ 54,592 KB
最終ジャッジ日時 2024-04-11 22:22:01
合計ジャッジ時間 6,534 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
53,840 KB
testcase_01 AC 116 ms
53,868 KB
testcase_02 AC 178 ms
54,196 KB
testcase_03 AC 131 ms
54,016 KB
testcase_04 AC 199 ms
54,592 KB
testcase_05 AC 163 ms
54,156 KB
testcase_06 AC 178 ms
54,336 KB
testcase_07 AC 182 ms
54,472 KB
testcase_08 AC 177 ms
54,464 KB
testcase_09 AC 190 ms
54,568 KB
testcase_10 AC 189 ms
54,368 KB
testcase_11 AC 197 ms
54,464 KB
testcase_12 AC 194 ms
54,468 KB
testcase_13 AC 186 ms
54,344 KB
testcase_14 AC 177 ms
54,240 KB
testcase_15 AC 182 ms
54,040 KB
testcase_16 AC 188 ms
54,356 KB
権限があれば一括ダウンロードができます

ソースコード

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