consider array A N element integer aDefine product transformation simultaneous update AiAiAi1 multiply element element right number an remain for example start array a a2 n4 product transformation A4 4 4 2 product transformation A16 16 8 2your simple task calculate array a M product transformation since number big output modulo Q