結果
| 問題 | 
                            No.392 2分木をたどれ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             gu_21816943
                         | 
                    
| 提出日時 | 2017-06-27 23:51:13 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 765 bytes | 
| コンパイル時間 | 1,787 ms | 
| コンパイル使用メモリ | 75,132 KB | 
| 実行使用メモリ | 55,536 KB | 
| 最終ジャッジ日時 | 2024-10-04 13:50:07 | 
| 合計ジャッジ時間 | 2,451 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 3 | 
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
class Main {
	static PrintWriter out = new PrintWriter(System.out);
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		int point;
		for (int i = 0; i < num; i++) {
			point = Integer.parseInt(br.readLine());
			len(point);
			out.println();
		}
		br.close();
		out.flush();
	}
	public static int len(int point) {
		if (point == 0) {
			return 0;
		} else {
			if (point % 2 == 0) {
				out.print("R");
				return len((point - 1) / 2);
			} else {
				out.print("L");
				return len(point / 2);
			}
		}
	}
}
            
            
            
        
            
gu_21816943