結果

問題 No.63 ポッキーゲーム
ユーザー nohopennohopen
提出日時 2019-02-11 19:14:18
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 5,256 KB
実行使用メモリ 11,928 KB
最終ジャッジ日時 2023-09-26 08:55:03
合計ジャッジ時間 2,210 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,856 KB
testcase_01 AC 19 ms
11,848 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 18 ms
11,740 KB
testcase_05 AC 18 ms
11,696 KB
testcase_06 AC 18 ms
11,644 KB
testcase_07 AC 18 ms
11,748 KB
testcase_08 AC 18 ms
11,864 KB
testcase_09 AC 18 ms
11,820 KB
testcase_10 AC 18 ms
11,712 KB
testcase_11 AC 18 ms
11,928 KB
testcase_12 AC 17 ms
11,632 KB
testcase_13 WA -
testcase_14 AC 17 ms
11,664 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 17 ms
11,744 KB
権限があれば一括ダウンロードができます

ソースコード

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