結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー jjjj
提出日時 2016-07-26 23:53:50
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 1,050 ms
コンパイル使用メモリ 31,744 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 09:43:21
合計ジャッジ時間 949 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 9 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 8 ms
5,376 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 2 ms
5,376 KB
testcase_09 WA -
testcase_10 AC 1 ms
5,376 KB
testcase_11 WA -
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 5 ms
5,376 KB
testcase_15 AC 3 ms
5,376 KB
testcase_16 AC 6 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 7 ms
5,376 KB
testcase_19 AC 5 ms
5,376 KB
testcase_20 AC 9 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 4 ms
5,376 KB
testcase_23 AC 8 ms
5,376 KB
testcase_24 AC 8 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:9:28:

    9 |   write(cformat(4:8),'(i5)'),N-1
      |                            1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

  implicit none
  integer::N,i
  character,allocatable::L(:)
  integer::total(6),max,indx
  character*16::cformat='(a,     (1x,a))'
  data total/6*0/
  read *,N
  allocate(L(N-1))
  write(cformat(4:8),'(i5)'),N-1
  read cformat,L

  do i=1,N-1
     indx = ICHAR(L(i))-ICHAR('0')
     total(indx) = total(indx) + 1
  end do
  max = MAXVAL(total)
  do i=6,1,-1
     if(max.eq.total(i)) then
        print '(i0)', i
        return
     end if
  end do
end program
0