結果

問題 No.170 スワップ文字列(Easy)
ユーザー 双六双六
提出日時 2020-07-27 02:27:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 5,000 ms
コード長 457 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 91,768 KB
最終ジャッジ日時 2023-09-11 05:34:44
合計ジャッジ時間 4,434 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,584 KB
testcase_01 AC 146 ms
91,668 KB
testcase_02 AC 124 ms
83,528 KB
testcase_03 AC 126 ms
83,696 KB
testcase_04 AC 127 ms
83,848 KB
testcase_05 AC 139 ms
91,608 KB
testcase_06 AC 138 ms
91,768 KB
testcase_07 AC 107 ms
77,236 KB
testcase_08 AC 125 ms
83,516 KB
testcase_09 AC 125 ms
83,400 KB
testcase_10 AC 138 ms
87,860 KB
testcase_11 AC 98 ms
71,496 KB
testcase_12 AC 98 ms
71,764 KB
testcase_13 AC 99 ms
71,648 KB
testcase_14 AC 100 ms
71,500 KB
testcase_15 AC 106 ms
76,748 KB
testcase_16 AC 99 ms
71,824 KB
testcase_17 AC 96 ms
71,756 KB
testcase_18 AC 95 ms
71,744 KB
testcase_19 AC 97 ms
71,580 KB
testcase_20 AC 100 ms
71,668 KB
testcase_21 AC 105 ms
76,652 KB
testcase_22 AC 99 ms
71,816 KB
testcase_23 AC 96 ms
71,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
import itertools

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = list(input())
	D = defaultdict(int)
	P = list(itertools.permutations(S, len(S)))
	for i in range(len(P)):
		D["".join(P[i])] += 1

	# print(D)
	print(len(D) - 1)



if __name__ == '__main__':
	main()
0