package main import ( "fmt" ) func main() { solve() } func solve(){ var x, N, a, ans int fmt.Scan(&x, &N) for i:=0; i