結果
問題 | No.756 チャンパーノウン定数 (1) |
ユーザー | ciel |
提出日時 | 2018-12-06 12:15:37 |
言語 | Clojure(Beta) (1.11.2) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 471 bytes |
コンパイル時間 | 375 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 73,640 KB |
最終ジャッジ日時 | 2024-05-01 07:29:50 |
合計ジャッジ時間 | 53,522 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | TLE | - |
testcase_02 | TLE | - |
testcase_03 | TLE | - |
testcase_04 | TLE | - |
testcase_05 | TLE | - |
testcase_06 | TLE | - |
testcase_07 | TLE | - |
testcase_08 | TLE | - |
testcase_09 | TLE | - |
testcase_10 | TLE | - |
testcase_11 | TLE | - |
testcase_12 | TLE | - |
testcase_13 | TLE | - |
testcase_14 | TLE | - |
testcase_15 | TLE | - |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | TLE | - |
testcase_21 | TLE | - |
testcase_22 | TLE | - |
ソースコード
#!/usr/bin/clojure (defn calc2 [d num bse] (if (zero? d) (rem num bse) (recur (- d 1) (quot num bse) bse) ) ) (defn calc [digits expbase bse x n] (if (> x n) (calc2 (- (- digits 1) (rem n digits)) (+ expbase (quot n digits)) bse) (recur (+ digits 1) (* expbase bse) bse (* (* (+ digits 1) (* expbase bse)) (- bse 1)) (- n x)) ) ) (defn ma [] (let [n (read *in* nil nil)] (if (not (= n nil)) (do (println (calc 1 1 10 9 (- n 1))) (ma) )) ) ) (ma)