結果
| 問題 | No.756 チャンパーノウン定数 (1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-06 12:13:02 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| + 29µs | |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 3 ms |
| コンパイル使用メモリ | 6,272 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2026-08-26 17:49:18 |
| 合計ジャッジ時間 | 2,323 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#!/usr/bin/env gosh (define (calc2 d num bse) (if (zero? d) (modulo num bse) (calc2 (- d 1) (quotient num bse) bse) ) ) (define (calc digits expbase bse x n) (if (> x n) (calc2 (- (- digits 1) (modulo n digits)) (+ expbase (quotient n digits)) bse) (calc (+ digits 1) (* expbase bse) bse (* (* (+ digits 1) (* expbase bse)) (- bse 1)) (- n x)) ) ) (define (ma) (let ((n (read))) (if (not (eof-object? n)) (begin (write (calc 1 1 10 9 (- n 1))) (newline) (ma) )) ) ) (ma)