結果

問題 No.207 世界のなんとか
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-09-19 13:22:07
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 337 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 14,724 KB
最終ジャッジ日時 2023-08-23 18:52:03
合計ジャッジ時間 2,179 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
12,704 KB
testcase_01 AC 26 ms
14,724 KB
testcase_02 AC 26 ms
12,668 KB
testcase_03 AC 25 ms
12,848 KB
testcase_04 AC 25 ms
12,640 KB
testcase_05 AC 26 ms
12,656 KB
testcase_06 AC 26 ms
12,776 KB
testcase_07 AC 25 ms
12,628 KB
testcase_08 AC 25 ms
12,784 KB
testcase_09 AC 26 ms
12,892 KB
testcase_10 AC 25 ms
12,932 KB
testcase_11 AC 25 ms
12,684 KB
testcase_12 AC 26 ms
12,684 KB
testcase_13 AC 27 ms
14,680 KB
testcase_14 AC 26 ms
12,780 KB
testcase_15 AC 26 ms
12,756 KB
testcase_16 AC 25 ms
12,732 KB
testcase_17 AC 25 ms
12,636 KB
testcase_18 AC 26 ms
12,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (chk-each-digit3 n)
  (string-scan (number->string n) "3"))

(define (chk3p n)
  (cond
   ((= 0 (mod n 3)) #t)
   ((chk-each-digit3 n) #t)
   (else #f)))

(define (take3 ap)
  (filter (^ (x) (chk3p x)) ap))

(let* ((from (read)) (to (read)))
  (map (^ (x) (display x) (newline))
       (take3 (iota (+ 1 (- to from)) from)))
  )
0