結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2016-08-24 16:57:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 313 bytes |
| コンパイル時間 | 638 ms |
| コンパイル使用メモリ | 65,692 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 02:04:03 |
| 合計ジャッジ時間 | 1,031 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
string func(int a)
{
string res;
while (a>0) {
res=string(1, a%2 ? 'L' : 'R')+res;
a=(a-1)/2;
}
return res;
}
int main()
{
int m; cin>>m;
while (m--) {
int a; cin>>a;
cout<<func(a)<<endl;
}
}
hogeover30