Procter & Gamble Interview Question

calculation sample: 5()6()7=108 7()9()3=222 something like that