結果
問題 | No.52 よくある文字列の問題 |
ユーザー | バカらっく |
提出日時 | 2019-09-12 07:41:57 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 377 bytes |
コンパイル時間 | 141 ms |
コンパイル使用メモリ | 10,708 KB |
実行使用メモリ | 7,968 KB |
最終ジャッジ日時 | 2023-09-15 14:05:17 |
合計ジャッジ時間 | 1,289 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,868 KB |
testcase_01 | AC | 15 ms
7,892 KB |
testcase_02 | AC | 17 ms
7,852 KB |
testcase_03 | AC | 15 ms
7,776 KB |
testcase_04 | AC | 17 ms
7,776 KB |
testcase_05 | AC | 17 ms
7,848 KB |
testcase_06 | AC | 17 ms
7,796 KB |
testcase_07 | AC | 16 ms
7,968 KB |
testcase_08 | AC | 15 ms
7,764 KB |
testcase_09 | AC | 15 ms
7,772 KB |
testcase_10 | AC | 16 ms
7,852 KB |
ソースコード
# coding: utf-8 mojiretu = input().rstrip() dic = {} def getAns(current): if (len(current) == 1): return [current] ret = [] ret += [i + current[len(current) - 1:] for i in getAns(current[0:len(current) - 1])] ret += [i + current[0:1] for i in getAns(current[1:])] return ret ret = getAns(mojiretu) for i in ret: dic[i] = 0 print(len(dic))