結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
t8m8⛄️
|
| 提出日時 | 2016-08-21 15:46:13 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 286 ms / 2,000 ms |
| コード長 | 843 bytes |
| コンパイル時間 | 5,377 ms |
| コンパイル使用メモリ | 84,128 KB |
| 実行使用メモリ | 46,544 KB |
| 最終ジャッジ日時 | 2024-11-07 22:25:23 |
| 合計ジャッジ時間 | 5,467 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;
public class No0392 {
static final Scanner in = new Scanner(System.in);
static final PrintWriter out = new PrintWriter(System.out,false);
static boolean debug = false;
static void solve() {
int m = in.nextInt();
for (int i=0; i<m; i++) {
int a = in.nextInt() + 1;
StringBuilder sb = new StringBuilder();
while (a != 1) {
sb.append(a%2 == 0 ? "L" : "R");
a /= 2;
}
out.println(sb.reverse());
}
}
public static void main(String[] args) {
debug = args.length > 0;
long start = System.nanoTime();
solve();
out.flush();
long end = System.nanoTime();
dump((end - start) / 1000000 + " ms");
in.close();
out.close();
}
static void dump(Object... o) { if (debug) System.err.println(Arrays.deepToString(o)); }
}
t8m8⛄️