結果

問題 No.191 供託金
ユーザー k.hk.h
提出日時 2019-08-04 18:51:14
言語 Go
(1.23.4)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 398 bytes
コンパイル時間 11,513 ms
コンパイル使用メモリ 223,528 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 13:42:08
合計ジャッジ時間 12,733 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

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