結果
問題 |
No.2707 Bag of Words Encryption
|
ユーザー |
![]() |
提出日時 | 2025-03-31 06:41:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2025-03-31 06:41:53 |
合計ジャッジ時間 | 2,326 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
def fun(s): dic = {} for si in s: if si not in dic: dic[si] = 1 else: dic[si] += 1 res = "" for i in range(ord("A"), ord("Z") + 1): ci = chr(i) if ci in dic: res += f"{dic[ci]}" else: res += "0" return res _ = input() s = input() print(fun(s))