結果
問題 |
No.2593 Reorder and Mod 120
|
ユーザー |
|
提出日時 | 2023-12-29 15:32:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,132 KB |
実行使用メモリ | 77,484 KB |
最終ジャッジ日時 | 2024-09-27 16:09:51 |
合計ジャッジ時間 | 2,729 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 10 RE * 16 |
ソースコード
N = int(input()) S = input() from collections import Counter ans = set() C_S = Counter(S) for i in range(min(1000, int(S))): isOK = True tmp = Counter(S) for t in list(str(i).zfill(3)): 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))