简单的for循环判断,挑选已通过代码中比较精简的作为示例:

N=int(input())
for _ in range(N):
    b=input().split()
    t=b[0]
    s=int(b[1])
    if t.startswith('Child') and s<=100:
        print("Children")
    elif t.startswith("Tech") and s>200:
        print("Tech")
    elif "novel" in t.lower():
        print("Novel")
    else:
        print("Other")