結果

問題 No.2707 Bag of Words Encryption
ユーザー Haniwa
提出日時 2025-10-13 12:44:40
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 10,397 ms
コンパイル使用メモリ 401,904 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-13 12:44:53
合計ジャッジ時間 11,937 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
	input! {
		_n: usize,
		s: String,
	}

	let mut ans = [0; 26];

    for c in s.chars() {
        ans[(c as u8 - 65) as usize] += 1;
    }

    println!("{}", ans.into_iter().map(|a| a.to_string()).collect::<String>());
}
0