結果
| 問題 | No.392 2分木をたどれ |
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2016-08-24 16:57:42 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 313 bytes |
| 記録 | |
| コンパイル時間 | 515 ms |
| コンパイル使用メモリ | 77,332 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-08 09:14:00 |
| 合計ジャッジ時間 | 1,209 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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