結果

問題 No.341 沈黙の期間
コンテスト
ユーザー tsuchinaga
提出日時 2019-02-28 09:11:45
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 1 ms / 5,000 ms
+ 335µs
コード長 300 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 14,168 ms
コンパイル使用メモリ 282,148 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-27 18:20:19
合計ジャッジ時間 15,530 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import "fmt"

func main() {
	var s string
	_, _ = fmt.Scan(&s)

	max := 0
	cnt := 0
	for _, r := range []rune(s) {
		if string(r) != "…" {
			if max < cnt {
				max = cnt
			}
			cnt = 0
		} else {
			cnt++
		}
	}

	if max < cnt {
		fmt.Println(cnt)
	} else {
		fmt.Println(max)
	}
}
0