結果

問題 No.191 供託金
ユーザー いともたやすく行われるえげつない行為いともたやすく行われるえげつない行為
提出日時 2017-02-20 12:53:20
言語 Go
(1.21.3)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 472 bytes
コンパイル時間 12,883 ms
コンパイル使用メモリ 211,696 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-28 19:38:57
合計ジャッジ時間 14,016 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
	"io"
	"os"
)

func main() {
	solve(os.Stdin, os.Stdout, os.Stderr)
}

func solve(in io.Reader, out io.Writer, err io.Writer) {
	var number int
	fmt.Fscan(in, &number)
	var sum int
	var vote [102]int

	for i := 0; i < number; i++ {
		fmt.Fscan(in, &vote[i])
		sum += vote[i]
	}

	threshold := int(float64(sum) / 10.0)

	var count int
	for i := 0; i < number; i++ {
		if vote[i] <= threshold {
			count++
		}
	}
	fmt.Fprintln(out, count*30)
}
0