結果

問題 No.191 供託金
コンテスト
ユーザー k.h
提出日時 2019-08-04 18:51:14
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 398 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 11,458 ms
コンパイル使用メモリ 279,356 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2026-03-30 07:47:40
合計ジャッジ時間 13,514 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())
	a := make([]int, N)
	var total, t, m int
	for i := 0; i < N; i++ {
		sc.Scan()
		t, _ = strconv.Atoi(sc.Text())
		total += t
		a[i] = t
	}
	for i := range a {
		if a[i] <= total/10 {
			m += 30
		}
	}
	fmt.Println(m)
}
0