program simple_hash
  implicit none

  character(len=100) :: text
  integer :: i
  integer :: hash_value

  text = "202301044TanakaHiyori"
  hash_value = 0

  do i = 1, len_trim(text)
     hash_value = mod(hash_value * 31 + iachar(text(i:i)), 100000)
  end do

  print *, "入力データ : ", trim(text)
  print *, "ハッシュ値 : ", hash_value

end program simple_hash