program main implicit none integer*8::N,keta integer*8::num(12) integer*8::total,i read *,N keta = 1 total = -1 do i=1,12 total = total + 26**i if(total.ge.N) exit end do keta = i N = N - (total - 26**keta) - 1 do i=1,keta num(i) = MOD(N,26) N = N/26 end do do i=keta,1,-1 write(*,'(a)',advance='no') CHAR(ICHAR('A')+num(i)) end do print *, end program main