結果

問題 No.400 鏡
ユーザー osada-yumosada-yum
提出日時 2023-10-30 16:43:10
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 519 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 31,108 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-30 16:43:12
合計ジャッジ時間 1,247 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,372 KB
testcase_01 AC 1 ms
4,372 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 AC 1 ms
4,372 KB
testcase_04 AC 1 ms
4,372 KB
testcase_05 AC 1 ms
4,372 KB
testcase_06 AC 1 ms
4,372 KB
testcase_07 AC 1 ms
4,372 KB
testcase_08 AC 1 ms
4,372 KB
testcase_09 AC 1 ms
4,372 KB
testcase_10 AC 1 ms
4,372 KB
testcase_11 AC 1 ms
4,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program yukicoder_400
  use, intrinsic :: iso_fortran_env
  implicit none
  integer(int32), parameter :: max_len = 20
  character(len=max_len) :: s
  character(len=:), allocatable :: ans
  integer(int32) :: n
  integer(int32) :: i, j
  read(input_unit, *) s
  n = len_trim(s)
  allocate(character(len=n) :: ans)
  do i = n, 1, -1
     j = n - i + 1
     select case(s(i:i))
     case("<"); ans(j:j) = ">"
     case(">"); ans(j:j) = "<"
     end select
  end do
  write(output_unit, '(a)') ans
end program yukicoder_400
0