結果
| 問題 | No.170 スワップ文字列(Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-26 02:09:28 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 5,000 ms |
| + 672µs | |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2026-10-06 06:01:02 |
| 合計ジャッジ時間 | 2,595 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)))