結果

問題 No.2593 Reorder and Mod 120
ユーザー Nikkuniku029
提出日時 2023-12-29 15:38:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 82,344 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2024-09-27 16:11:15
合計ジャッジ時間 7,173 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 6 WA * 6 TLE * 1 -- * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N = int(input())
S = input()
ans = set()
C_S = Counter(S)
for i in range(1000):
    isOK = True
    tmp = Counter(S)
    for t in list(str(i).zfill(min(3, N))):
        if t in tmp:
            tmp[t] -= 1
        else:
            isOK = False
    for v in tmp.values():
        if v < 0:
            isOK = False
    if isOK:
        ans.add(i)
print(len(ans))
0