結果

問題 No.327 アルファベット列
ユーザー jj
提出日時 2016-08-21 22:51:34
言語 Fortran
(gFortran 14.2.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 646 ms
コンパイル使用メモリ 31,360 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 22:29:17
合計ジャッジ時間 2,040 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:16:32:

   16 |      write(*,'(a)',advance='no'),ACHAR(ICHAR('A')+res(i)-1)
      |                                1
Warning: Legacy Extension: Comma before i/o item list at (1)
Main.f90:18:16:

   18 |   write(*,'(a)'),ACHAR(ICHAR('A')+res(i))
      |                1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

program main
  implicit none
  integer*8::N,i,modn,divn
  integer::res(10)
  data res/10*0/
  read *,N
  do i=1,10
     divn = N/26
     modn = MOD(N,26)
     res(i) = modn
     if(divn.eq.0) exit
     N    = divn
  end do

  do i=i,2,-1
     write(*,'(a)',advance='no'),ACHAR(ICHAR('A')+res(i)-1)
  end do
  write(*,'(a)'),ACHAR(ICHAR('A')+res(i))
end program main
0