ZT Systems interview question

Not so hard