Rosetta Problems

AND OR Equation

https://atcoder.jp/contests/arc144/tasks/arc144_d