結果

問題 No.2614 Delete ABC
ユーザー osada-yumosada-yum
提出日時 2024-03-13 18:15:19
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 623 bytes
コンパイル時間 771 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-13 18:15:21
合計ジャッジ時間 1,540 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 3 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program yukicoder_2614
  use, intrinsic :: iso_fortran_env
  implicit none
  integer(int32) :: t
  integer(int32) :: i
  read(input_unit, *) t
  do i = 1, t
     call solve()
  end do
contains
  impure subroutine solve()
    integer(int32) :: n
    character, allocatable :: ans(:)
    integer(int32) :: i
    read(input_unit, *) n
    allocate(ans(3 * n))
    ans(1:6) = ["A", "B", "A", "C", "B", "C"]
    do i = 3, n
       ans(3 * (i - 1) + 1) = "A"
       ans(3 * (i - 1) + 2) = "B"
       ans(3 * (i - 1) + 3) = "C"
    end do
    write(output_unit, '(*(a1))') ans(:)
  end subroutine solve
end program yukicoder_2614
0