結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-02-08 11:06:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 5,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 82,160 KB |
| 実行使用メモリ | 66,044 KB |
| 最終ジャッジ日時 | 2024-07-05 07:22:44 |
| 合計ジャッジ時間 | 1,432 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import copy
s=list(input())
n=len(s)
l=[]
for i in range(2**n):
x=format(i,'0'+str(n)+'b')
s2=copy.copy(s)
l2=[]
for j in range(n):
if x[j]=='0':
l2.append(s2.pop(0))
else:
l2.append(s2.pop(-1))
l.append(''.join(l2))
print(len(set(l)))
あかりき