結果

問題 No.392 2分木をたどれ
ユーザー vjudge1
提出日時 2025-04-22 21:26:29
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 189,932 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-04-22 21:26:32
合計ジャッジ時間 2,726 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |                 scanf("%lld",&n);
      |                 ~~~~~^~~~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
using namespace std;
int t,n;
signed main(){
//	freopen("path.in","r",stdin);
//	freopen("path.out","w",stdout);
	cin>>t;
	while(t--){
		scanf("%lld",&n);
		while(n){
			printf("%c",n%2==0?'R':'L');
			n=(n-1)/2;
		}
		printf("\n");
	}
	return 0;
}
0