! 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