結果

問題 No.392 2分木をたどれ
ユーザー jjjj
提出日時 2016-12-14 22:18:48
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 1,564 ms
コンパイル使用メモリ 26,360 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-20 06:57:01
合計ジャッジ時間 913 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 14 ms
4,376 KB
testcase_02 AC 13 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:11:38:

            write(*,'(a)',advance='no'),'R'
                                      1
Warning: Legacy Extension: Comma before i/o item list at (1)
Main.f90:13:38:

            write(*,'(a)',advance='no'),'L'
                                      1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

program main
  implicit none
  integer::a,m,i,j,bits
  read *,m
  do i=1,m
     read *, a
     a = a + 1
     bits=BIT_SIZE(a) - LEADZ(a) - 2
     do j=bits,0,-1
        if(BTEST(a, j)) then
           write(*,'(a)',advance='no'),'R'
        else
           write(*,'(a)',advance='no'),'L'
        end if
     end do
     print *,
  end do
end program main
0