package main

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

func main() {
	buf := bufio.NewReader(os.Stdin)
	var q int
	fmt.Fscan(buf, &q)
	for ; q > 0; q-- {
		var n, a, sum int
		fmt.Fscan(buf, &n)
		for i := 0; i < n; i++ {
			fmt.Fscan(buf, &a)
			sum += a
		}
		fmt.Println((sum + n - 1) / n)
	}
}

package main

import (
	"bufio"
	"os"
	"runtime"
	"strconv"
)

/* solution */

func solve() {
	q := readInt()
	for i := 0; i < q; i++ {
		solveOne()
	}
}

func solveOne() {
	n := readInt()
	sum := int64(0)
	for i := 0; i < n; i++ {
		sum += readInt64()
	}
	d := int64(0)
	if sum%int64(n) > 0 {
		d = int64(1)
	}
	printInt64(sum/int64(n) + d)
}

/* stubs */

func main() {

	var f *os.File
	if runtime.GOROOT() == "C:\\Soft\\Go" {
		f, _ = os.Open("input.txt")
		defer f.Close()
	} else {
		f = os.Stdin
	}

	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	reader = bufio.NewScanner(f)

	const maxCapacity = 1024 * 1024
	buf := make([]byte, maxCapacity)
	reader.Buffer(buf, maxCapacity)

	reader.Split(bufio.ScanWords)

	solve()

}

var reader *bufio.Scanner
var writer *bufio.Writer

func read() string {
	reader.Scan()
	return reader.Text()
}

func readInt() int {
	reader.Scan()
	ret, _ := strconv.Atoi(reader.Text())
	return ret
}

func print(s string) {
	writer.WriteString(s)
	writer.WriteString("\n")
}

func printInt(i int) {
	print(strconv.Itoa(i))
}

func printInt64(i int64) {
	print(strconv.FormatInt(i, 10))
}

func readInt64() int64 {
	reader.Scan()
	ret, _ := strconv.ParseInt(reader.Text(), 10, 64)
	return ret
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	var t, n, a int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		sum := 0
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a)
			sum += a
		}
		fmt.Printf("%.0f\n", math.Ceil(float64(sum)/float64(n)))
	}
}

package main

import "fmt"

func main() {
	var q int
	fmt.Scan(&q)
	for ; q > 0; q-- {
		var n, a, sum int
		fmt.Scan(&n)
		for i := 0; i < n; i++ {
			fmt.Scan(&a)
			sum += a
		}
		fmt.Println((sum + n - 1) / n)
	}
}

package main

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

var (
	reader *bufio.Reader = bufio.NewReader(os.Stdin)
	writer *bufio.Writer = bufio.NewWriter(os.Stdout)
	Debug                = true
)

func Printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func Scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func Dprint(format string, a ...interface{}) {
	if Debug {
		fmt.Fprintf(os.Stderr, format+"\n", a...)
	}
}

var q int

func main() {
	defer writer.Flush()

	Scanf("%d\n", &q)
	for i := 0; i < q; i++ {
		var n int
		Scanf("%d\n", &n)
		sum := int64(0)
		for j := 0; j < n; j++ {
			var ai int64
			Scanf("%d", &ai)
			sum += ai
		}
		Scanf("\n")
		div := sum / int64(n)
		if sum%int64(n) != 0 {
			div++
		}
		Printf("%d\n", div)
	}
}

// https://codeforces.com/problemset/problem/1234/A

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var t int
	fmt.Fscanf(in, "%d\n", &t)
	for i := 0; i < t; i++ {
		var n int
		fmt.Fscanf(in, "%d\n", &n)
		var sum int
		for j := 0; j < n; j++ {
			var temp int
			if j == n-1 {
				fmt.Fscanf(in, "%d\n", &temp)
			} else {
				fmt.Fscanf(in, "%d", &temp)
			}
			sum += temp
		}
		ans := sum / n
		if sum%n != 0 {
			fmt.Fprintln(out, ans+1)
		} else {
			fmt.Fprintln(out, ans)
		}
	}

}

package main

import "fmt"

func ceil(a, b int) int {
	return (a + b - 1) / b
}

func main() {
	var N int
	fmt.Scan(&N)
	q := make([][]int, N)
	a := make([]int, N)
	for i := range q {
		var t, v int
		fmt.Scan(&t)
		q[i] = make([]int, t)
		for j := 0; j < t; j++ {
			fmt.Scan(&q[i][j])
			v += q[i][j]
		}
		a[i] = ceil(v, len(q[i]))
	}
	for i := 0; i < len(a); i++ {
		fmt.Println(a[i])
	}
}

//HOWDY! IT'S ME! A HARD BLACKISH DICK MOVE!
package main

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

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := PrintlnInts(X...)

/*******************************************************************/

func main() {
	for q := ReadInt(); q > 0; q-- {
		n := ReadInt()
		a := ReadIntSlice(n)
		sum := 0
		for _, val := range a {
			sum += val
		}
		ans := (sum + n - 1) / n
		fmt.Println(ans)
	}
}

/*********** Math ***********/
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func min(args ...int) int {
	if len(args) == 0 {
		panic("empty!")
	}
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

func max(args ...int) int {
	if len(args) == 0 {
		panic("empty!")
	}
	max := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] > max {
			max = args[i]
		}
	}
	return max
}

func _gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return _gcd(b, a%b)
}

func gcd(args ...int) int {
	if len(args) == 0 {
		panic("empty!")
	}
	gcd := args[0]
	for i := 1; i < len(args); i++ {
		gcd = _gcd(gcd, args[i])
	}
	return gcd
}

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9))
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

// PrintIntsLine returns integers string delimited by a space.
func PrintlnInts(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// DigitSum returns digit sum of a decimal number.
// DigitSum only accept a positive integer.
func DigitSum(n int) int {
	if n < 0 {
		return -1
	}

	res := 0

	for n > 0 {
		res += n % 10
		n /= 10
	}

	return res
}

// DigitNumOfDecimal returns digits number of n.
// n is non negative number.
func DigitNumOfDecimal(n int) int {
	res := 0

	for n > 0 {
		n /= 10
		res++
	}

	return res
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// Strtoi is a wrapper of `strconv.Atoi()`.
// If `strconv.Atoi()` returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var q int

func main() {
	q = ReadInt()
	for i := 0; i < q; i++ {
		n := ReadInt()
		A := ReadIntSlice(n)

		sum := Sum(A...)
		fmt.Println((sum + (n - 1)) / n)
	}
}

// Kiriage returns Ceil(a/b)
// a >= 0, b > 0
func Kiriage(a, b int) int {
	return (a + (b - 1)) / b
}

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

/*******************************************************************/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// DigitSum returns digit sum of a decimal number.
// DigitSum only accept a positive integer.
func DigitSum(n int) int {
	if n < 0 {
		return -1
	}

	res := 0

	for n > 0 {
		res += n % 10
		n /= 10
	}

	return res
}

// DigitNumOfDecimal returns digits number of n.
// n is non negative number.
func DigitNumOfDecimal(n int) int {
	res := 0

	for n > 0 {
		n /= 10
		res++
	}

	return res
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// Strtoi is a wrapper of `strconv.Atoi()`.
// If `strconv.Atoi()` returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var q int

func main() {
	q = ReadInt()
	for i := 0; i < q; i++ {
		n := ReadInt()
		A := ReadIntSlice(n)

		sum := Sum(A...)
		fmt.Println(Kiriage(sum, n))
	}
}

// Kiriage returns Ceil(a/b)
// a >= 0, b > 0
func Kiriage(a, b int) int {
	return (a + (b - 1)) / b
}

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

/*******************************************************************/

package main

import (
	"fmt"
	"os"
)

func main() {
	_, err := os.Stat("in.txt")
	if err == nil {
		os.Stdin, err = os.OpenFile("in.txt", os.O_RDONLY, 0666)
	}

	var n, m, a, s int

	fmt.Scan(&n)
	for i:=0; i<n; i++ {
		fmt.Scan(&m)
		s = 0
		for j:=0; j<m; j++ {
			fmt.Scan(&a)
			s+=a
		}
		if (s%m==0) {
			fmt.Println(s/m)
		} else {
			fmt.Println(s/m+1)
		}

	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
	"strings"
)

func main() {
	f(os.Stdin, os.Stdout)
}

func f(in io.Reader, out io.Writer) {
	s := bufio.NewScanner(in)
	q := parse(read(s))

	for i := 0; i < int(q); i += 1 {
		n := float64(parse(read(s)))
		r := 0.0
		for _, item := range strings.Split(read(s), " ") {
			r += float64(parse(item))
		}
		fmt.Fprintln(out, int(math.Ceil(r / n)))
	}
}

func read(s *bufio.Scanner) string {
	s.Scan()
	return s.Text()
}

func parse(s string) int {
	r, _ := strconv.ParseInt(s, 10, 64)
	return int(r)
}

package main

import "fmt"

func main() {
	var a int
	fmt.Scanf("%d\n", &a)
	// fmt.Println(a)
	for p := a; p > 0; p-- {
		n := 0
		fmt.Scanf("%d\n", &n)
		// fmt.Println(n)
		ans := 0.0
		for j := 0; j < n; j++ {
			tmp := 0
			if j == n-1 {
				fmt.Scanf("%d\n", &tmp)
			} else {
				fmt.Scanf("%d", &tmp)
			}
			ans += float64(tmp)
		}
		fmt.Println(int((ans + float64(n) - 1.0) / float64(n)))
	}
}

package main

import "fmt"

func main() {
	var size int
	var arrSize int
	fmt.Scanln(&size)
	for i := 0; i < size; i++ {
		fmt.Scanln(&arrSize)
		sum := 0
		var num int
		for j := 0; j < arrSize; j++ {
			fmt.Scanf("%d", &num)
			sum = num + sum
		}
		fmt.Scanln()
		result := sum / arrSize
		if sum % arrSize != 0 {
			result++
		}
		fmt.Println(result)
	}
}

package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func minll(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func maxll(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	q := readi()
	for i := 0; i < q; i++ {
		n := readi()
		a := make([]int, n)
		for i := range a {
			a[i] = readi()
		}
		println(solve(n, a))
	}
}

func solve(n int, a []int) int {
	sum := 0
	for _, v := range a {
		sum += v
	}
	res := sum / n
	if sum%n != 0 {
		res++
	}
	return res
}

package main

import (
	"fmt"
)

//noinspection GoUnhandledErrorResult
func main() {
	var q int
	fmt.Scanf("%d\n", &q)
	for qq := 0; qq < q; qq += 1 {
		var n, t int
		s := 0
		fmt.Scanf("%d\n", &n)
		for i := 0; i < n; i++ {
			fmt.Scanf("%d", &t)
			s += t
		}
		fmt.Scanf("\n")
		if s%n == 0 {
			fmt.Println(s / n)
		} else {
			fmt.Println(s/n + 1)
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var T int
	_, _ = fmt.Scan(&T)
	for T > 0 {
		var n int
		var x, sum float64
		_, _ = fmt.Scan(&n)
		for i := 0; i < n; i++ {
			_, _ = fmt.Scan(&x)
			sum += x
		}
		fmt.Println(int64(math.Ceil(sum / float64(n))))
		T--
	}
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)

	var q int
	fmt.Fscanf(reader, "%d\n", &q)

	for ; q > 0; q-- {
		var n, t, s int64
		fmt.Fscanf(reader, "%d\n", &n)

		for i := int64(0); i < n; i++ {
			if i == n-1 {
				fmt.Fscanf(reader, "%d\n", &t)
			} else {
				fmt.Fscanf(reader, "%d", &t)
			}

			s += t
		}

		if s%n == 0 {
			fmt.Printf("%d\n", s/n)
		} else {
			fmt.Printf("%d\n", s/n+1)
		}
	}
}

// Author: sighduck
// URL: https://codeforces.com/contest/1234/problem/A

package main

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

func ceilDiv(sum int, n int) int {
	return (sum + n - 1) / n
}

func Solve(n int, a []int) int {
	sum := 0
	for _, elem := range a {
		sum += elem
	}
	return ceilDiv(sum, n)
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var q int
	fmt.Fscanf(reader, "%d\n", &q)
	for i := 0; i < q; i++ {
		var n int
		fmt.Fscanf(reader, "%d\n", &n)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscanf(reader, "%d", &a[i])
		}
		fmt.Fscanf(reader, "\n")
		fmt.Fprintf(writer, "%d\n", Solve(n, a))
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	var t, n, a int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		sum := 0
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a)
			sum += a
		}
		fmt.Printf("%.0f", math.Ceil(float64(sum)/float64(n)))
	}
}

// https://codeforces.com/problemset/problem/1234/A

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var t int
	fmt.Fscanf(in, "%d\n", &t)
	for i := 0; i < t; i++ {
		var n int
		fmt.Fscanf(in, "%d\n", &n)
		var sum int
		for j := 0; j < n; j++ {
			var temp int
			if j == n-1 {
				fmt.Fscanf(in, "%d\n", &temp)
			} else {
				fmt.Fscanf(in, "%d", &temp)
			}
			sum += temp
		}
		ans := sum / n
		if sum%n != 0 {
			check := ans * n
			fmt.Fprintln(out, check-ans)
		} else {
			fmt.Fprintln(out, ans)
		}
	}

}

package main

import "fmt"

func main() {
	var size int
	fmt.Scanln(&size)
	for i := 0; i < size; i++ {
		var arrSize int
		fmt.Scanf("%d", &arrSize)
		sum := 0
		for j := 0; j < arrSize; j++ {
			var num int
			fmt.Scanf("%d", &num)
			sum += num
		}
		result := sum / arrSize
		if sum % arrSize != 0 {
			result++
		}
		fmt.Println(result)
	}
}

package main

import (
	"fmt"
	"os"
)

//noinspection GoUnhandledErrorResult
//
func main() {
	//in, _ := os.OpenFile("data/in.txt", os.O_RDONLY, 0)
	//defer in.Close()
	//out, _ := os.OpenFile("data/out.txt", os.O_WRONLY, 0)
	//defer out.Close()

	in := os.Stdin
	out := os.Stdout

	var q int
	fmt.Fscanf(in, "%d\n", &q)
	for qq := 0; qq < q; qq += 1 {
		var n, t int
		s := 0
		fmt.Fscanf(in, "%d\n", &n)
		for i := 0; i < n; i++ {
			fmt.Fscanf(in, "%d", &t)
		}
		fmt.Fscanf(in, "\n")
		if s%n == 0 {
			fmt.Fprintln(out, s/n)
		} else {
			fmt.Fprintln(out, s/n+1)
		}
	}
}

package main

import (
	"fmt"
)

//noinspection GoUnhandledErrorResult
func main() {
	var q int
	fmt.Scanf("%d\n", &q)
	for qq := 0; qq < q; qq += 1 {
		var n, t int
		s := 0
		fmt.Scanf("%d\n", &n)
		for i := 0; i < n; i++ {
			fmt.Scanf("%d", &t)
		}
		fmt.Scanf("\n")
		if s%n == 0 {
			fmt.Println(s / n)
		} else {
			fmt.Println(s/n + 1)
		}
	}
}

package main

import (
	"fmt"
	"os"
)

//noinspection GoUnhandledErrorResult
//
func main() {
	//in, _ := os.OpenFile("data/in.txt", os.O_RDONLY, 0)
	//defer in.Close()
	//out, _ := os.OpenFile("data/out.txt", os.O_WRONLY, 0)
	//defer out.Close()

	in := os.Stdin
	out := os.Stdout

	var q int
	fmt.Fscanf(in, "%d\n", &q)
	defer println(q)
	for qq := 0; qq < q; qq += 1 {
		var n, t int
		s := 0
		fmt.Fscanf(in, "%d\n", &n)
		defer println(n)
		for i := 0; i < n; i++ {
			fmt.Fscanf(in, "%d", &t)
			defer println(t)
		}
		fmt.Fscanf(in, "\n")
		if s%n == 0 {
			fmt.Fprintln(out, s/n)
		} else {
			fmt.Fprintln(out, s/n+1)
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var T int
	_, _ = fmt.Scan(&T)
	for T > 0 {
		var n int
		var x, sum float64
		_, _ = fmt.Scan(&n)
		for i := 0; i < n; i++ {
			_, _ = fmt.Scan(&x)
			sum += x
		}
		fmt.Println(math.Ceil(sum / float64(n)))
		T--
	}
}


package main

import (
	"bufio"
	"os"
	"runtime"
	"strconv"
)

/* solution */

func solve() {

	n := readInt()
	max := int64(0)
	sum := int64(0)
	for i := 0; i < n; i++ {
		v := int64(readInt())
		sum += v
		if v > max {
			max = v
		}
	}

	if sum%2 == 0 && max <= (sum-max) {
		println("YES")
	} else {
		println("NO")
	}

}

/* stubs */

func main() {

	var f *os.File
	if runtime.GOROOT() == "C:\\Soft\\Go" {
		f, _ = os.Open("input.txt")
	} else {
		f = os.Stdin
	}
	defer f.Close()

	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	reader = bufio.NewScanner(f)
	reader.Split(bufio.ScanWords)

	solve()

}

var reader *bufio.Scanner
var writer *bufio.Writer

func readInt() int {
	reader.Scan()
	ret, _ := strconv.Atoi(reader.Text())
	return ret
}

func print(s string) {
	writer.WriteString(s)
}

func println(s string) {
	print(s)
	print("\n")
}

// Author: sighduck
// URL: https://codeforces.com/problemset/problem/1201/B

package main

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

func Solve(n int, a []int64) string {
	var sum int64
	var maxElement int64
	for i := 0; i < n; i++ {
		sum += a[i]
		if a[i] > maxElement {
			maxElement = a[i]
		}
	}
	if sum%2 == 0 && maxElement <= (sum-maxElement) {
		return "YES"
	}
	return "NO"
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	a := make([]int64, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(reader, "%d", &a[i])
	}
	fmt.Fprintf(writer, "%s\n", Solve(n, a))
}

package main

import (
	"bufio"
	"os"
	"runtime"
	"strconv"
)

/* solution */

func solve() {

	n := readInt()
	ok := 0
	for i := 0; i < n; i++ {
		ok = (ok + readInt()) % 2
	}

	if ok == 0 {
		println("YES")
	} else {
		println("NO")
	}

}

/* stubs */

func main() {

	var f *os.File
	if runtime.GOROOT() == "C:\\Soft\\Go" {
		f, _ = os.Open("input.txt")
	} else {
		f = os.Stdin
	}
	defer f.Close()

	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	reader = bufio.NewScanner(f)
	reader.Split(bufio.ScanWords)

	solve()

}

var reader *bufio.Scanner
var writer *bufio.Writer

func readInt() int {
	reader.Scan()
	ret, _ := strconv.Atoi(reader.Text())
	return ret
}

func print(s string) {
	writer.WriteString(s)
}

func println(s string) {
	print(s)
	print("\n")
}

// Author: sighduck
// URL: https://codeforces.com/problemset/problem/1201/B

package main

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

func Solve(n int, a []int) string {
	sum := 0
	maxElement := 0
	for i := 0; i < n; i++ {
		sum += a[i]
		if a[i] > maxElement {
			maxElement = a[i]
		}
	}
	if sum%2 == 0 && maxElement <= (sum-maxElement) {
		return "YES"
	}
	return "NO"
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(reader, "%d", &a[i])
	}
	fmt.Fprintf(writer, "%s\n", Solve(n, a))
}


package main

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

func main() {
    writer := bufio.NewWriter(os.Stdout)            // membuat variabel writer dengan tipe data *Writer dari package bufio
    var n,k int                                     // membuat variabel n dan k dengan tipe data int
    fmt.Scan(&n,&k)                                 // menerima input data n dan k
    if (n == 1) && (k == 1) {                       // jika n sama dengan 1 dan k sama dengan 1
        fmt.Println("a")                            // maka cetak output "a"
    } else if (n < k) || (k > 26) || (k == 1) {     // jika n < k atau k > 26 atau k sama dengan 1
        fmt.Println(-1)                             // maka cetak output "-1"
    } else {
        k -= 2                                      // kurangi nilai k sebesar 2
        c, t := 'a', n-k                            // membuat variabel c tipe rune dengan nilai awal 'a' dan t tipe int dengan nilai awal n-k
        for i := 0; i < t; i++ {                    // looping sebanyak t kali
            writer.WriteRune(c)                     // mencetak output nilai c
            if c == 'a' { c = 'b' } else { c = 'a' }// jika nilai c adalah 'a' maka ubah jadi 'b' atau kebalikannya
        }
        c = 'c'                                     // isi nilai c dengan 'c'
        for i := 0; i < k; i++ {                    // looping sebanyak k kali
            writer.WriteRune(c)                     // mencetak output nilai c
            c++                                     // tambah nilai c sebesar 1 (untuk mengubah menjadi huruf selanjutnya)
        }
        writer.WriteRune('\n')                      // mencetak enter
        writer.Flush()                              // mencetak hasil output ke layar
    }
}

package main

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

func main() {
	var n,k int
	out := bufio.NewWriter(os.Stdout)
	var x rune
	fmt.Scan(&n,&k)
	if n<k || (k==1 && n!=1) {
		fmt.Println("-1")
	} else {
		for ;n>k && n>2;n-=2 {
			out.WriteString("ab")
			//fmt.Print("ab")
		}
		if n==1 || n!=k {
			out.WriteString("a")
			//fmt.Print("a")
		} else {
			out.WriteString("ab")
			//fmt.Print("ab")
		}
		for i:=2;i<k;i++ {
			x='a'+ rune(i)
			out.WriteString(string(x))
			//fmt.Print(string(x))
		}
		out.Flush()
	}
}

package main

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

func main() {
    writer := bufio.NewWriter(os.Stdout)
    var n,k int
    fmt.Scan(&n,&k)
    if (n == 1) && (k == 1) {
        fmt.Println("a")
    } else if (n < k) || (k > 26) || (k == 1) {
        fmt.Println(-1)
    } else {
        k -= 2
        c, t := 'a', n-k
        for i := 0; i < t; i++ {
            writer.WriteRune(c)
            if c == 'a' { c = 'b' } else { c = 'a' }
        }
        c = 'c'
        for i := 0; i < k; i++ {
            writer.WriteRune(c)
            c++
        }
        writer.WriteRune('\n')
        writer.Flush()
    }
}

package main

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

func main() {
    writer := bufio.NewWriter(os.Stdout)
    var n,k int
    fmt.Scan(&n,&k)
    if (n < k) || (k > 26) || (k == 1) {
        fmt.Println(-1)
    } else {
        k -= 2
        c, t := 'a', n-k
        for i := 0; i < t; i++ {
            writer.WriteRune(c)
            if c == 'a' { c = 'b' } else { c = 'a' }
        }
        c = 'c'
        for i := 0; i < k; i++ {
            writer.WriteRune(c)
            c++
        }
        writer.WriteRune('\n')
        writer.Flush()
    }
}

package main

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

func main() {
    writer := bufio.NewWriter(os.Stdout)
    var n,k int
    fmt.Scan(&n,&k)
    if (n < k) || (k > 26) {
        fmt.Println(-1)
    } else {
        if k == 1 {
            for i := 0; i < n; i++ { writer.WriteRune('a') }
        } else {
            k -= 2
            c, t := 'a', n-k
            for i := 0; i < t; i++ {
                writer.WriteRune(c)
                if c == 'a' { c = 'b' } else { c = 'a' }
            }
            c = 'c'
            for i := 0; i < k; i++ {
                writer.WriteRune(c)
                c++
            }
        }
        writer.WriteRune('\n')
        writer.Flush()
    }
}


package main

import (
	"fmt"
	"bufio"
	"os"
	"io"
	"strconv"
	// "time"
)

func main() {
	// defer func(start time.Time) {
	// 	fmt.Println(time.Since(start))
	// }(time.Now())

	scanner := NewScanner(os.Stdin)
	n := scanner.nextInt()

	a, b := make([]int, n), make([]int, n)

	for i := range a {
		a[i] = scanner.nextInt()
	}

	for i := range b {
		b[i] = scanner.nextInt()
	}

	var joy int64 = 0
	var x, y int = 0, 0

	for i := range a {
		if b[i]==1 || a[i]*2 < b[i] {
			joy--
			continue
		}
		if b[i]%2==0 {
			x = b[i]/2
			y = x
		} else {
			x = b[i]/2
			y = x+1
		}
		joy += int64(x)*int64(y)
	}

	fmt.Println(joy)
}

type Scanner struct {
	scanner *bufio.Scanner
}

func NewScanner(r io.Reader) *Scanner {
	scanner := bufio.NewScanner(r)
	scanner.Split(bufio.ScanWords)

	return &Scanner{
		scanner: scanner,
	}
}

func (s *Scanner) next() string {
	ok := s.scanner.Scan()
	if !ok {
		panic("Scan error")
	}
	return s.scanner.Text()
}

func (s *Scanner) nextInt() int {
	n, err := strconv.Atoi(s.next())
	if err!=nil {
		panic(err)
	}
	return n
}

func (s *Scanner) nextInt64() int64 {
	n, err := strconv.ParseInt(s.next(), 10, 64)
	if err!=nil {
		panic(err)
	}
	return n

}

func (s *Scanner) SetScanLines() {
	s.scanner.Split(bufio.ScanLines)
}

func (s *Scanner) SetScanWords() {
	s.scanner.Split(bufio.ScanWords)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewBuffer(bs)

	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	a := make([]int64, n)
	b := make([]int64, n)
	for i := 0; i < n-1; i++ {
		fmt.Fscanf(reader, "%d ", &a[i])
	}
	fmt.Fscanf(reader, "%d\n", &a[n-1])
	for i := 0; i < n-1; i++ {
		fmt.Fscanf(reader, "%d ", &b[i])
	}
	fmt.Fscanf(reader, "%d\n", &b[n-1])
	var ans int64
	for i := 0; i < n; i++ {
		if 2*a[i] < b[i] || b[i] == 1 {
			ans--
		} else if b[i]%2 == 0 {
			ans += (b[i] / 2) * (b[i] / 2)
		} else {
			ans += (b[i] / 2) * (b[i]/2 + 1)
		}
	}
	fmt.Printf("%d", ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewBuffer(bs)

	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	a := make([]int64, n)
	b := make([]int64, n)
	for i := 0; i < n-1; i++ {
		fmt.Fscanf(reader, "%d ", &a[i])
	}
	fmt.Fscanf(reader, "%d\n", &a[n-1])
	for i := 0; i < n-1; i++ {
		fmt.Fscanf(reader, "%d ", &b[i])
	}
	fmt.Fscanf(reader, "%d\n", &b[n-1])
	var ans int64
	for i := 0; i < n; i++ {
		if 2*a[i] < b[i] {
			ans--
		} else if b[i]%2 == 0 {
			ans += (b[i] / 2) * (b[i] / 2)
		} else {
			ans += (b[i] / 2) * (b[i]/2 + 1)
		}
	}
	fmt.Printf("%d", ans)
}


package main

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

func run(or io.Reader, ow io.Writer) {
	in := bufio.NewReader(or)
	out := bufio.NewWriter(ow)
	defer out.Flush()

	solve := func() {
		var n, k int
		fmt.Fscan(in, &n, &k)
		var a []byte
		for i := 0; i < k; i++ {
			a = append(a, byte('a'+i))
			for j := k - 1; j >= i+2; j-- {
				a = append(a, byte('a'+i))
				a = append(a, byte('a'+j))
			}

			a = append(a, byte('a'+i))

		}
		for i := k - 2; i >= 1; i-- {
			a = append(a, byte('a'+i))
		}
		for i := 0; i < n; i++ {
			fmt.Fprint(out, string(a[i%len(a)]))

		}
	}

	T := 1
	//fmt.Fscan(in, &T)
	for o := 0; o < T; o++ {
		solve()
	}

}

func main() { run(os.Stdin, os.Stdout) }

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var n,k int
	fmt.Fscan(in,&n,&k)
	nex:=[26]int{}
	var lst byte
	ans := []byte{}
	bts := []byte{}
	for i:=0;i<k;i++{
		bts = append(bts,byte(int('a')+i))
	}
	for i:=1;i<=n;i++{
		if i==1{
			lst = 'a'
			ans = append(ans,'a')
			continue
		}
		now := int(lst-'a')
		index := (nex[now]+now)%k
		ans = append(ans,bts[index])
		lst = bts[index]
		nex[now]++
	}
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	fmt.Fprintln(out,string(ans))
}

package main
import (
	"bufio"
	."fmt"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func main() {
	o := bufio.NewWriter(os.Stdout)
	var n, k, x int
	a := [26]int{}
	for Scan(&n, &k); n > 0; n-- {
		Fprintf(o, "%c", 'a'+x)
		a[x], x = (a[x]+1)%k, (x+a[x])%k
	}
	o.Flush()
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
	"strings"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n, k int
	Fscan(in, &n, &k)

	if k == 1 {
		Fprintln(out, strings.Repeat("a", n))
		return
	}

	cnt := make([][]int, k)
	for i := range cnt {
		cnt[i] = make([]int, k)
	}
	min := func(a []int) int {
		v := a[0]
		for _, w := range a[1:] {
			if w < v {
				v = w
			}
		}
		return v
	}

	s := make([]byte, n)
	s[0] = 0
	for i := 1; i < n; i++ {
		mi := 0
		miCnt2 := int(1e9)
		pre := s[i-1]
		for j, c := range cnt[pre] {
			if c < cnt[pre][mi] {
				mi = j
				miCnt2 = min(cnt[mi])
			} else if c == cnt[pre][mi] {
				mic := min(cnt[j])
				if mic < miCnt2 {
					mi = j
					miCnt2 = mic
				}
			}
		}
		cnt[s[i-1]][mi]++
		s[i] = byte(mi)
	}

	for i := range s {
		s[i] += 'a'
	}

	Fprintln(out, string(s))
}

func main() { run(os.Stdin, os.Stdout) }

package main

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

var out = bufio.NewWriter(os.Stdout)

func main() {
	defer out.Flush()

	var n, k int
	fmt.Scan(&n)
	fmt.Scan(&k)

	var base []byte
	for i := 0; i < k; i++ {
		base = append(base, 'a')
		cur := 'a' + byte(i)
		for j := byte('b'); j <= cur; j++ {
			base = append(base, cur, j)
		}
	}

	for i := 0; i < n; i++ {
		fmt.Fprintf(out, "%c", base[i%len(base)])
	}
	fmt.Fprintln(out)
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)

	var n,k int
	fmt.Fscan(in,&n,&k)
	mp := map[byte]map[byte]int{}
	num := map[byte]int{}
	var lst byte
	ans := ""
	for i:=1;i<=n;i++{
		if i==1{
			lst = 'a'
			ans = ans+string(lst)
			num[lst]++
			continue
		}
		mi := 99999999
		var index byte
		for j:=0;j<=k-1;j++{
			if mp[lst]==nil{
				mp[lst]=map[byte]int{}
			}
			if mi>mp[lst][byte('a'+j)]{
				index = byte('a'+j)
				mi = mp[lst][byte('a'+j)]
			}else if mi==mp[lst][byte('a'+j)]&&num[byte('a'+j)]<num[index]{
				index = byte('a'+j)
			}
		}
		mp[lst][index]++
		ans = ans + string(index)
		lst = index
		num[lst]++
	}
	out := os.Stdout
	fmt.Fprintln(out,ans)
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
	"strings"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n, k int
	Fscan(in, &n, &k)

	if k == 1 {
		Fprintln(out, strings.Repeat("a", n))
		return
	}

	cnt := make([][]int, k)
	for i := range cnt {
		cnt[i] = make([]int, k)
	}

	s := make([]byte, n)
	s[0] = 0
	for i := 1; i < n; i++ {
		mi := 0
		for j, c := range cnt[s[i-1]] {
			if c < cnt[s[i-1]][mi] {
				mi = j
			}
		}
		cnt[s[i-1]][mi]++
		s[i] = byte(mi)
	}

	for i := range s {
		s[i] += 'a'
	}

	Fprintln(out, string(s))
}

func main() { run(os.Stdin, os.Stdout) }

package main

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

func run(or io.Reader, ow io.Writer) {
	in := bufio.NewReader(or)
	out := bufio.NewWriter(ow)
	defer out.Flush()

	solve := func() {
		var n, k int
		fmt.Fscan(in, &n, &k)
		var a []byte
		for i := 0; i < k; i++ {
			a = append(a, byte('a'+i))
			for j := k - 1; j >= i+2; j-- {
				a = append(a, byte('a'+i))
				a = append(a, byte('a'+j))
			}

			a = append(a, byte('a'+i))

		}
		for i := k - 2; i >= 0; i-- {
			a = append(a, byte('a'+i))
		}
		for i := 0; i < n; i++ {
			fmt.Fprint(out, string(a[i%len(a)]))

		}
	}

	T := 1
	//fmt.Fscan(in, &T)
	for o := 0; o < T; o++ {
		solve()
	}

}

func main() { run(os.Stdin, os.Stdout) }