!> This file was processed by `fypp`. !> Today's fortune: "Lucky:)", really OK? !> ランダムウォーク猿「'Dijkstra' で はっぴー.」 program f902870 use, intrinsic :: iso_fortran_env !> auto use module implicit none integer(int32) :: n, k integer(int32), allocatable :: ans(:) read(input_unit, *) n, k if (n == 1 .and. n /= k) then write(output_unit, '(i0)') -1 stop end if if (k > n .or. mod(n, k) /= 0) then write(output_unit, '(i0)') -1 stop end if allocate(ans(n), source = 2) associate(num1 => n / k) ans(1:num1) = 1 end associate write(output_unit, '(*(i0, 1x))') ans(:) end program f902870