結果
問題 | No.712 赤旗 |
ユーザー |
|
提出日時 | 2024-09-17 13:07:41 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
AC
|
実行時間 | 21 ms / 2,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-09-17 13:07:43 |
合計ジャッジ時間 | 643 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
(define (count-W-in-string s)(define (rec idx count)(if (= idx (string-length s))count(rec(+ idx 1)(if (char=? (string-ref s idx) #\W) (+ count 1) count))))(rec 0 0))(define yuki712(let*((n (read))(m (read))(_ (read-line))(s ""))(do((i 0 (+ i 1)))((= i n))(set! s (string-append s (read-line))))(write (count-W-in-string s))(newline)))