結果

問題 No.170 スワップ文字列(Easy)
ユーザー tnodino
提出日時 2022-06-25 15:59:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 212 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 20,208 KB
最終ジャッジ日時 2024-11-14 14:32:48
合計ジャッジ時間 3,195 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
S = input()
N = len(S)
P = list(permutations([i for i in range(N)], N))
s = set()
for p in P:
    t = ''
    for i in range(N):
        t += S[p[i]]
    s.add(t)
print(len(s)-1)
0