結果

問題 No.392 2分木をたどれ
ユーザー ヒッキープログラミングするスレヒッキープログラミングするスレ
提出日時 2016-07-12 15:59:31
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 356 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 5,292 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-25 21:56:34
合計ジャッジ時間 1,274 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 356 ms
4,376 KB
testcase_02 AC 352 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

typeset -i m  a i
read m
for ((i=0;i<m;i++)); do
  read a
  s=''
  while (( a > 0 )); do
     if (( (a % 2) > 0 )); then
        a=$(( (a - 1) / 2 ))
        s="L$s"
     else
        a=$(( (a - 2) / 2))
        s="R$s"
     fi
  done
  echo $s
done
0