結果
問題 |
No.341 沈黙の期間
|
ユーザー |
![]() |
提出日時 | 2025-01-15 00:16:30 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 11,464 ms |
コンパイル使用メモリ | 237,092 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-15 00:16:45 |
合計ジャッジ時間 | 12,441 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
package main import . "fmt" import . "strings" import sl "slices" import "cmp" const C rune = '…' var S = string(C) func main() { var s string Scan(&s) f := FieldsFunc(s, func(r rune) bool { return r != C }) if len(f) == 0 { Println(0) return } s = sl.MaxFunc(f, func(a,b string) int { return cmp.Compare(Count(a,S),Count(b,S)) }) Println(Count(s, S)) }