結果

問題 No.712 赤旗
ユーザー _Clay_____Clay____
提出日時 2018-10-07 21:27:28
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 853 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-04-20 18:19:47
合計ジャッジ時間 850 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
16,000 KB
testcase_01 AC 24 ms
15,744 KB
testcase_02 AC 25 ms
15,872 KB
testcase_03 AC 25 ms
15,872 KB
testcase_04 AC 26 ms
16,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(let* ((l1 (map string->number (string-split (read-line) " ")))
       (y (car l1))
       (result (let loop ((i 0)
                          (a 0))
                         (if (= i y)
                             a
                             (loop (+ i 1) 
                                   (+ a (let loop2 ((l (string->list (read-line)))
                                                    (a 0))
                                                   (if (null? l)
                                                       a
                                                       (loop2 (cdr l)
                                                              (if (eq? #\W (car l))
                                                                  (+ a 1)
                                                                  a))))))))))
      (print result))
0