結果

問題 No.170 スワップ文字列(Easy)
ユーザー kbyskbys
提出日時 2020-07-21 08:31:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 47 ms / 5,000 ms
コード長 221 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 11,488 KB
最終ジャッジ日時 2023-08-27 01:56:50
合計ジャッジ時間 2,122 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,056 KB
testcase_01 AC 46 ms
11,396 KB
testcase_02 AC 32 ms
8,088 KB
testcase_03 AC 41 ms
7,952 KB
testcase_04 AC 44 ms
8,112 KB
testcase_05 AC 47 ms
11,324 KB
testcase_06 AC 45 ms
11,488 KB
testcase_07 AC 18 ms
8,056 KB
testcase_08 AC 42 ms
7,904 KB
testcase_09 AC 42 ms
7,980 KB
testcase_10 AC 42 ms
9,700 KB
testcase_11 AC 15 ms
7,948 KB
testcase_12 AC 15 ms
8,028 KB
testcase_13 AC 14 ms
8,032 KB
testcase_14 AC 14 ms
7,968 KB
testcase_15 AC 15 ms
7,992 KB
testcase_16 AC 14 ms
7,948 KB
testcase_17 AC 15 ms
7,972 KB
testcase_18 AC 15 ms
7,904 KB
testcase_19 AC 15 ms
8,020 KB
testcase_20 AC 15 ms
8,000 KB
testcase_21 AC 15 ms
7,956 KB
testcase_22 AC 15 ms
8,024 KB
testcase_23 AC 15 ms
7,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
s = input()
d = {}
for i in itertools.permutations(s, len(s)):
    a = "".join(list(i))
    if a == s:
        continue
    if a not in d:
        d[a] = 1
    else:
        d[a] += 1
print(len(d.keys()))
0