結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー fmhrfmhr
提出日時 2015-05-15 00:19:02
言語 Go
(1.22.1)
結果
AC  
実行時間 242 ms / 5,000 ms
コード長 268 bytes
コンパイル時間 10,836 ms
コンパイル使用メモリ 208,856 KB
実行使用メモリ 7,928 KB
最終ジャッジ日時 2023-09-08 14:27:19
合計ジャッジ時間 14,255 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
4,376 KB
testcase_01 AC 238 ms
7,916 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 240 ms
7,928 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 143 ms
5,676 KB
testcase_15 AC 59 ms
4,376 KB
testcase_16 AC 181 ms
5,704 KB
testcase_17 AC 54 ms
4,376 KB
testcase_18 AC 174 ms
5,696 KB
testcase_19 AC 133 ms
5,664 KB
testcase_20 AC 242 ms
7,928 KB
testcase_21 AC 7 ms
4,380 KB
testcase_22 AC 84 ms
5,632 KB
testcase_23 AC 224 ms
7,916 KB
testcase_24 AC 229 ms
7,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
)

func main() {
	var N, l int
	fmt.Scan(&N)
	c := make([]int, 7)
	for i:=0; i<N; i++{
		fmt.Scan(&l)
		c[l] += 1
	}
//	fmt.Println(c)
	var ans, max int
	for i, v := range c{
		if v >= max{
			max = v
			ans = i
		}
	}
	fmt.Println(ans)
}
0