結果
問題 |
No.2773 Wake up Record 1
|
ユーザー |
|
提出日時 | 2024-06-09 19:45:28 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 515 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 24,064 KB |
最終ジャッジ日時 | 2024-12-30 19:05:28 |
合計ジャッジ時間 | 3,862 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 21 WA * 1 |
ソースコード
(define (solve n s) (let loop ([l '()] [i 0] [c #\x]) (cond [(= i n) (reverse l)] [(and (char=? #\x c) (char=? #\o (string-ref s i))) (loop (cons (+ i 1) l) (+ i 1) (string-ref s i))] [else (loop l (+ i 1) (string-ref s i))]))) (define (main args) (let* ([n (read)] [s (symbol->string (read))]) (let1 l (solve n s) (print (length l)) (if (not (null? l)) (print (string-join (map number->string l) " "))))) 0)