結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-05 11:06:13 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 5,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,784 KB |
| 最終ジャッジ日時 | 2024-12-23 00:28:49 |
| 合計ジャッジ時間 | 1,370 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
# -*- coding:utf-8 -*- import collections import math if __name__ == "__main__": s = raw_input() l = len(s) s_set = set(s) n = len(s_set) count = collections.Counter(s) ans = math.factorial(l) for i in count.values(): ans /= math.factorial(i) print ans -1