結果
問題 | No.392 2分木をたどれ |
ユーザー |
👑 |
提出日時 | 2019-03-31 22:11:31 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 591 bytes |
コンパイル時間 | 615 ms |
コンパイル使用メモリ | 72,852 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 12:17:04 |
合計ジャッジ時間 | 1,056 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <cstdio>#include <cstdlib>#include <cstddef>#include <vector>#include <algorithm>#include <cmath>#include <string>#include <iostream>#include <iomanip>int main(void){int m;std::cin >> m;for(int i = 0; i < m; i++){int a;std::cin >> a;std::string path;while(0 < a){if(a % 2 == 0){path.insert(0, "R");a = a / 2 - 1;} else {path.insert(0, "L");a /= 2;}}std::cout << path << std::endl;}return 0;}