結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-26 02:09:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 277 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-23 00:19:35 |
| 合計ジャッジ時間 | 1,868 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import math
S = [x for x in input()]
N = len(S)
l = []
while len(S) > 0:
c = S[0]
l.append(S.count(c))
while c in S:
S.remove(c)
ans = math.factorial(N)
for x in l:
ans = ans / math.factorial(x)
print(str(int(ans-1)))