結果

問題 No.341 沈黙の期間
ユーザー jjjj
提出日時 2016-07-28 22:52:57
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-24 10:38:07
合計ジャッジ時間 648 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 1 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

  character(len=600)::str
  integer::prev=-1,len=0,maxlen=0
  read *,str
  do i=1,LEN_TRIM(str)
     if ( ICHAR(str(i  :i  )).eq.226 .and. &
          ICHAR(str(i+1:i+1)).eq.128 .and. &
          ICHAR(str(i+2:i+2)).eq.166 ) then
        if( (i-prev.eq.3) .or. (prev.eq.-1)) then
           prev   = i
           len    = len + 1
           maxlen = MAX(len, maxlen)
        else
           prev   = -1
           len    = 0
        end if
     end if
  end do
  print '(i0)', maxlen
end program
0