結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー nohopennohopen
提出日時 2019-02-09 08:40:56
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 11,888 KB
最終ジャッジ日時 2023-09-14 04:06:49
合計ジャッジ時間 789 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
11,776 KB
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (fizzbuzz n)
  (define (fizzbuzzx n i)
    (if (> i n) '()
        (cons
          (cond ((= (modulo i 15) 0) "FizzBuzz")
                ((= (modulo i 5) 0) "Buzz")
                ((= (modulo i 3) 0) "Fizz")
                (else i))
          (fizzbuzzx n (+ i 1)))))
  (fizzbuzzx n 1))

(define (print-list lst)
  (if (null? lst) "EOF"
      (begin
        (print (car lst))
        (print-list (cdr lst)))))

(define (main args)
  (print-list (fizzbuzz 16)) 0)
0