結果

問題 No.2593 Reorder and Mod 120
ユーザー Nikkuniku029Nikkuniku029
提出日時 2023-12-29 15:38:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 82,708 KB
最終ジャッジ日時 2023-12-29 15:39:01
合計ジャッジ時間 6,504 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
73,008 KB
testcase_01 AC 63 ms
70,900 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 66 ms
70,928 KB
testcase_06 WA -
testcase_07 AC 64 ms
70,908 KB
testcase_08 AC 55 ms
66,748 KB
testcase_09 AC 61 ms
66,748 KB
testcase_10 AC 58 ms
68,884 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます

ソースコード

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