結果

問題 No.52 よくある文字列の問題
コンテスト
ユーザー MiyamonY
提出日時 2019-09-08 00:31:13
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 19 ms / 5,000 ms
+ 727µs
コード長 268 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 18 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 17,280 KB
最終ジャッジ日時 2026-07-31 05:28:45
合計ジャッジ時間 2,298 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(define (comb s)
  (cond ((null? s) '(()))
	(else
	 (append (map (lambda (x) (cons (car s) x)) (comb (cdr s)))
		 (map (lambda (x) (cons (last s) x)) (comb (drop-right s 1)))))))

(let* ((s (read-line)))
  (print (length (delete-duplicates (comb (string->list s))))))
0