結果

問題 No.392 2分木をたどれ
ユーザー hhgfhn1hhgfhn1
提出日時 2018-12-18 19:52:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 2,231 ms
コンパイル使用メモリ 76,488 KB
実行使用メモリ 61,880 KB
最終ジャッジ日時 2023-10-25 23:42:19
合計ジャッジ時間 3,581 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int m=scanner.nextInt();
		for(int i=0;i<m;i++) {
			int a=scanner.nextInt();
			String ans="";
			while(a>0) {
				if(a%2==0) {
					a/=2;
					a--;
					ans+="R";
				}else {
					a/=2;
					ans+="L";
				}
			}
			System.out.println(ans);
		}
	}
}
0