結果
問題 | No.392 2分木をたどれ |
ユーザー |
|
提出日時 | 2016-07-03 21:31:06 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 300 ms / 2,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 1,942 ms |
コンパイル使用メモリ | 74,324 KB |
実行使用メモリ | 47,024 KB |
最終ジャッジ日時 | 2024-10-12 19:57:24 |
合計ジャッジ時間 | 3,240 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args){ new Main().solver(); } void solver(){ Scanner sc=new Scanner(System.in); int m=sc.nextInt(); for(int i=0;i<m;i++){ int a=sc.nextInt(); StringBuilder sb=new StringBuilder(); for(;a>0;a>>=1){ if((a&1)==1){ sb.insert(0, "L"); }else{ sb.insert(0, "R"); } a-=1; } System.out.println(sb.toString()); } } }