結果
問題 |
No.706 多眼生物の調査
|
ユーザー |
![]() |
提出日時 | 2019-03-03 09:27:52 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 13,143 ms |
コンパイル使用メモリ | 240,536 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 13:07:17 |
合計ジャッジ時間 | 13,613 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 4 |
ソースコード
package main import ( "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) }