結果
問題 | No.2870 Dice Making |
ユーザー |
|
提出日時 | 2024-11-17 04:02:52 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 661 bytes |
コンパイル時間 | 1,550 ms |
コンパイル使用メモリ | 31,488 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 04:02:56 |
合計ジャッジ時間 | 2,430 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
!> This file was processed by `fypp`.!> Today's fortune: "Lucky:)", really OK?!> ランダムウォーク猿「'Dijkstra' で はっぴー.」program f902870use, intrinsic :: iso_fortran_env!> auto use moduleimplicit noneinteger(int32) :: n, kinteger(int32), allocatable :: ans(:)read(input_unit, *) n, kif (n == 1 .and. n /= k) thenwrite(output_unit, '(i0)') -1stopend ifif (k > n .or. mod(n, k) /= 0) thenwrite(output_unit, '(i0)') -1stopend ifallocate(ans(n), source = 2)associate(num1 => n / k)ans(1:num1) = 1end associatewrite(output_unit, '(*(i0, 1x))') ans(:)end program f902870