結果

問題 No.341 沈黙の期間
ユーザー LeonardoneLeonardone
提出日時 2016-03-25 07:15:09
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 445 bytes
コンパイル時間 1,098 ms
コンパイル使用メモリ 30,720 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-09 23:48:28
合計ジャッジ時間 1,866 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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
    
    PRINT '(I0)', ans
    
    STOP
END PROGRAM yukicoder
0