結果
問題 |
No.52 よくある文字列の問題
|
ユーザー |
![]() |
提出日時 | 2022-01-23 10:36:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 345 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-29 07:44:43 |
合計ジャッジ時間 | 1,239 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 1 RE * 1 |
ソースコード
s=input() sset=set() def cal(x,ss): if x in sset: return if len(x) == len(s): sset.add(x) return cal(x+ss[0],ss[1:]) cal(x+ss[-1],ss[:-1]) cal(s[0],s[1:]) cal(s[1],s[:-1]) print(len(sset))