結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2017-07-17 00:32:02 |
言語 | C++11 (gcc 8.5.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 417 bytes |
コンパイル時間 | 275 ms |
使用メモリ | 3,064 KB |
最終ジャッジ日時 | 2022-12-01 06:36:55 |
合計ジャッジ時間 | 1,025 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
3,044 KB |
testcase_01 | AC | 4 ms
3,064 KB |
testcase_02 | AC | 4 ms
3,016 KB |
コンパイルメッセージ
main.cpp:4:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] main(){ ^
ソースコード
#include<stdio.h> #include<string> using namespace std; main(){ int N; scanf("%d",&N); for(int i = 0;i < N;i++){ string str; int num; scanf("%d",&num); num++; while(num!=1){ if(num%2){ str = "R"+str; }else{ str = "L"+str; } num/=2; } printf("%s\n",str.c_str()); } }