Bitdefender Interview Question

Logic problems and writing a script to check if a program generates correct output