← Home
For problem statement at 1000-1999/1500-1599/1530-1539/1537/problemD.txt this is a correct solution, but verifier at 1000-1999/1500-1599/1530-1539/1537/verifierD.go ends with All tests passed can you fix the verifier? package main

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

func main() {
	in := bufio.NewReaderSize(os.Stdin, 1<<20)
	out := bufio.NewWriterSize(os.Stdout, 1<<20)
	defer out.Flush()

	var t int
	fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		var n uint
		fmt.Fscan(in, &n)

		if n&1 == 1 {
			fmt.Fprintln(out, "Bob")
		} else if n&(n-1) == 0 {
			if bits.TrailingZeros(n)%2 == 0 {
				fmt.Fprintln(out, "Alice")
			} else {
				fmt.Fprintln(out, "Bob")
			}
		} else {
			fmt.Fprintln(out, "Alice")
		}
	}
}