結果

問題 No.91 赤、緑、青の石
ユーザー yuki2006yuki2006
提出日時 2015-02-24 21:25:41
言語 Go
(1.22.1)
結果
AC  
実行時間 354 ms / 5,000 ms
コード長 736 bytes
コンパイル時間 15,970 ms
コンパイル使用メモリ 215,936 KB
実行使用メモリ 8,200 KB
最終ジャッジ日時 2023-09-06 12:09:42
合計ジャッジ時間 16,439 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 244 ms
8,196 KB
testcase_01 AC 160 ms
8,200 KB
testcase_02 AC 96 ms
8,196 KB
testcase_03 AC 178 ms
8,196 KB
testcase_04 AC 86 ms
8,200 KB
testcase_05 AC 208 ms
8,200 KB
testcase_06 AC 22 ms
7,876 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 60 ms
8,200 KB
testcase_12 AC 196 ms
8,200 KB
testcase_13 AC 224 ms
8,200 KB
testcase_14 AC 142 ms
8,196 KB
testcase_15 AC 232 ms
8,196 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 354 ms
8,092 KB
testcase_26 AC 332 ms
8,200 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 4 ms
4,376 KB
testcase_30 AC 230 ms
8,192 KB
testcase_31 AC 316 ms
8,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

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

var s = bufio.NewScanner(os.Stdin)

func next() string {
	s.Scan()
	return s.Text()
}

func nextInt() int {
	i, e := strconv.Atoi(next())
	if e != nil {
		panic(e)
	}
	return i
}
func nextLong() int64 {
	i, e := strconv.ParseInt(next(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}


func main() {

	s.Split(bufio.ScanWords)
	list := []int{nextInt(), nextInt(), nextInt()}
	sort.Ints(list)
	count := list[0]
	for i, _ := range list {
		list[i]-=count
	}
	for list[1] >= 1 && list[2] >= 3 {
		count+=1
		list[1]-=1
		list[2]-=3
		sort.Ints(list)
	}


	var a = list[1] / 5
	count+= a
	list[1]-=a
	var b = list[2] / 5
	count+= b
	list[2]-=b



	fmt.Println(count)


}
0