結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-11-28 01:02:17 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 400 bytes |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 17,280 KB |
| 最終ジャッジ日時 | 2024-11-27 12:26:07 |
| 合計ジャッジ時間 | 603 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
(define (solve n)
(let loop ((x n) (ls '()))
(if (zero? x)
(string-join ls "")
(loop (quotient (- x 1) 2)
(cons (if (odd? x) "L" "R") ls)))))
(define (MAIN)
(let loop ((n (string->number (read-line))) (ls '()))
(if (zero? n)
(string-join (reverse ls) "\n")
(loop (- n 1)
(cons (solve (string->number (read-line))) ls)))))
(print (MAIN))
neko_the_shadow