```go
package main
import (
"bufio"
"fmt"
"os"
)
func ceilDiv(a, b int64) int64 {
if a <= 0 {
return 0
}
return (a + b - 1) / b
}
func floorDiv(a, b int64) int64 {
if a < 0 {
return -((-a + b - 1) / b)
}
return a / b
}
func max64(a, b int64) int64 {
if a > b {
return a
}
return b
}
func min64(a, b int64) int64 {
if a < b {
return a
}
return b
}
func main() {
in := bufio.NewReader(os.Stdin)
var n int
fmt.Fscan(in, &n)
a := make([]int64, n)
var total int64
for i := 0; i < n; i++ {
fmt.Fscan(in, &a[i])
total += a[i]
}
ok := make([]bool, 101)
ok[0] = true
ok[100] = true
var pref int64
for i := 0; i < n; i++ {
ai := a[i]
before := pref
after := pref + ai
for p := 0; p <= 100; p++ {
var xL, xR int64
if p == 100 {
xL = ai
xR = ai
} else {
xL = ceilDiv(int64(p)*ai, 100)
xR = floorDiv(int64(p+1)*ai-1, 100)
if xL < 1 {
xL = 1
}
if xR > ai {
xR = ai
}
}
if xL > xR || xL > ai || xR < 1 {
continue
}
var yL, yR int64
if p == 100 {
yL = total
yR = total
} else {
yL = ceilDiv(int64(p)*total, 100)
yR = floorDiv(int64(p+1)*total-1, 100)
if yL < 1 {
yL = 1
}
if yR > total {
yR = total
}
}
gL := before + xL
gR := before + xR
L := max64(gL, yL)
R := min64(gR, yR)
if L <= R {
ok[p] = true
}
}
pref = after
}
out := bufio.NewWriter(os.Stdout)
first := true
for p := 0; p <= 100; p++ {
if ok[p] {
if !first {
fmt.Fprint(out, " ")
}
first = false
fmt.Fprint(out, p)
}
}
fmt.Fprintln(out)
out.Flush()
}
```