template times*(n:int,body) = (for _ in 0.." .} proc scan(): int = while true: var k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord proc printf(formatstr: cstring){.header: "", varargs.} let q = scan() q.times: let d = scan() # 深さ let x = scan() let t = scan() var ans = 1 var ok = true for i in 1..(d-1): ans = ans * (x+i) div i if ans <= t : continue ok = false printf("ZETUBOU\n") break if ok : printf("AC\n")