結果

問題 No.171 スワップ文字列(Med)
ユーザー noko2250
提出日時 2015-03-23 18:06:26
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 357 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-29 00:23:33
合計ジャッジ時間 908 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 2 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/c/Python34/python
# coding: utf-8


def main():
    S = input()
    ans = 1
    a = [0] * 26
    for i in range(len(S)):
        ans *= i+1
        a[ord(S[i])-ord('A')] += 1

    for i in range(26):
        while a[i] > 1:
            ans /= a[i]
            a[i] -= 1

    mod = 573
    print((int(ans)-1) % mod)

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