結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2019-03-03 09:32:57 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 487 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 11,384 ms |
コンパイル使用メモリ | 237,228 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 13:07:31 |
合計ジャッジ時間 | 12,631 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
package mainimport ("fmt""strings")func main() {var n, max, maxI int_, _ = fmt.Scan(&n)s := ""is := make(map[int]int, 0)for i := 0; i < n; i++ {_, _ = fmt.Scan(&s)c := strings.Count(s, "^")is[c]++if max < is[c] {max = is[c]maxI = c} else if max == is[c] && maxI < c {maxI = c}}fmt.Println(maxI)}