結果
| 問題 | No.191 供託金 |
| コンテスト | |
| ユーザー |
t_murano
|
| 提出日時 | 2016-07-10 15:58:26 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 733 bytes |
| 記録 | |
| コンパイル時間 | 14,971 ms |
| コンパイル使用メモリ | 220,916 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 22:28:32 |
| 合計ジャッジ時間 | 12,424 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
package main
import (
"bufio"
"fmt"
"log"
"os"
"strconv"
"strings"
)
func nextInt(sc *bufio.Scanner) int {
sc.Scan()
i, err := strconv.Atoi(sc.Text())
if err != nil {
log.Fatal(err)
}
return i
}
func nextIntList(sc *bufio.Scanner) []int {
sc.Scan()
input := strings.Split(sc.Text(), " ")
result := make([]int, len(input))
for i, v := range input {
if j, err := strconv.Atoi(v); err != nil {
log.Fatal(err)
} else {
result[i] = j
}
}
return result
}
func main() {
sc := bufio.NewScanner(os.Stdin)
nextInt(sc)
cList := nextIntList(sc)
vSum := 0
for _, c := range cList {
vSum += c
}
count := 0
for _, c := range cList {
if c <= vSum/10 {
count += 1
}
}
fmt.Println(count * 30)
}
t_murano