結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2016-11-28 01:00:24 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 407 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 17,280 KB |
最終ジャッジ日時 | 2024-11-27 12:26:06 |
合計ジャッジ時間 | 639 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
(define (solve n)(let loop ((x n) (ls '()))(if (zero? x)(string-join (reverse 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))