結果

問題 No.341 沈黙の期間
ユーザー Leonardone
提出日時 2016-03-25 07:16:26
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 475 bytes
コンパイル時間 796 ms
コンパイル使用メモリ 30,976 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-02 00:45:22
合計ジャッジ時間 659 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

! yukicoder My Practice
! author: Leonardone @ NEETSDKASU

PROGRAM yukicoder
    INTEGER(8) :: n, i, c, ans
    CHARACTER(1000) :: s
    
    READ(*,*) s
    
    n = LEN_TRIM(s)
    
    c = 0
    ans = 0
    
    DO i = 1, n - 2, 3
        IF (s(i:i+2) == '…') THEN
            c = c + 1
        ELSE
            IF (c > ans) ans = c
            c = 0
        END IF
    END DO
    
    IF (c > ans) ans = c
    
    PRINT '(I0)', ans
    
    STOP
END PROGRAM yukicoder
0