結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
|
提出日時 | 2019-09-08 00:31:13 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 17,152 KB |
最終ジャッジ日時 | 2024-06-27 14:25:47 |
合計ジャッジ時間 | 1,759 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
(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))))))