program SimpleHash
    implicit none

    character(len=*), parameter :: str = "202401356佐藤颯"
    integer :: i
    integer :: hash

    hash = 0

    do i = 1, len_trim(str)
        hash = hash + ichar(str(i:i))
    end do

    print *, "文字列: ", str
    print *, "ハッシュ値: ", hash

end program SimpleHash