!> This file was processed by `fypp`. !> Today's fortune: "Happy MLE", really OK? !> ランダムウォーク猿「'Dijkstra' で はっぴー.」 program yukicoder_3011 use, intrinsic :: iso_fortran_env !> auto use module implicit none integer(int32), parameter :: m = 30 integer(int32) :: x integer(int32) :: response integer(int32) :: i !> N が 10 ** 9 / 2 ** i と仮定. x = 10 ** 9 do i = 1, m x = (x + 1) / 2 write(output_unit, '(i0)') x flush(output_unit) read(input_unit, *) response if (response == 1) stop if (response == -1) error stop 2 end do end program yukicoder_3011