結果
| 問題 | No.170 スワップ文字列(Easy) |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2023-12-27 23:54:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 210 bytes |
| 記録 | |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 53,888 KB |
| 最終ジャッジ日時 | 2026-04-14 10:17:24 |
| 合計ジャッジ時間 | 2,133 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
from math import factorial
S = input()
from collections import defaultdict
dic = defaultdict(int)
for s in S:
dic[s] += 1
ans = factorial(len(S))
for v in dic.values():
ans //= factorial(v)
print(ans-1)
ntuda