結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-01 20:25:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 99 ms / 5,000 ms |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 583 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-04-06 20:26:44 |
| 合計ジャッジ時間 | 2,836 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = read().rstrip().decode()
def F(S):
if not S:
yield ''
return
for T in F(S[1:]):
yield S[0] + T
for T in F(S[:-1]):
yield S[-1] + T
answer = len(set(F(S)))
print(answer)
maspy