結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2018-05-26 03:09:27 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 61 ms |
コンパイル使用メモリ | 5,632 KB |
実行使用メモリ | 5,760 KB |
最終ジャッジ日時 | 2024-06-28 18:08:00 |
合計ジャッジ時間 | 578 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict;use warnings;my $m = <>; chomp $m;while (defined(my $x = <>)) {$x++;my @arr;while ($x > 1) {if ($x % 2) {push @arr, "R";} else {push @arr, "L";}$x /= 2;$x = int($x);}print join('', reverse(@arr)) . "\n";}