結果

問題 No.170 スワップ文字列(Easy)
ユーザー ryusuke
提出日時 2022-06-25 16:03:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 209 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 81,588 KB
実行使用メモリ 78,536 KB
最終ジャッジ日時 2024-11-14 14:38:06
合計ジャッジ時間 2,379 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

s = input()

l = len(s)
ans = set()
for i in permutations(range(l)):
    word = ""
    for j in range(l):
        word += s[i[j]]
    
    ans.add(word)

print(len(ans) - 1)
0