結果

問題 No.63 ポッキーゲーム
ユーザー nohopennohopen
提出日時 2019-02-11 19:14:18
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-07-19 03:56:03
合計ジャッジ時間 1,525 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (poky L K)
  (let ((n (quotient L 2)))
    (cond [(<= (truncate (/ n K)) 1) 0]
          [(= (modulo n K) 1) (* (- (truncate (/ n K)) 1) K)]
          [else (* (truncate (/ n K)) K)])))

#|
(define (create-list n)
  (if (= n 0) '()
      (cons (read) (create-list (- n 1)))))
|#
(define (main args)
  (let* ((L (read))
         (K (read)))
    (print (poky L K))) 0)
0