0 votes 0 votes How to calculate modulus of an exponential number? Mathematical Logic maths + – Reshu $ingh asked Feb 3, 2019 retagged Jul 12, 2019 by Cristine Reshu $ingh 732 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply sudoankit commented Feb 3, 2019 reply Follow Share I don't exactly understand what you mean, give me an example. Do you mean $3^{51} \mod 5 $? 1 votes 1 votes sreenivas.s1995 commented Feb 7, 2019 reply Follow Share its 2 right? 3^51 Mod 5 = ((3^17 Mod 5)^3 Mod 5) = ((129140163 Mod 5)^3 Mod 5) = (3^3 Mod 5) = 27 Mod 5 = 2 1 votes 1 votes Nirmal Mondal commented Feb 7, 2019 reply Follow Share Ans is 2. 1 votes 1 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes (a*b)%m = (a%m * b%m)%m so if you have a very big number like (3^100) % m, you can write it as by dividing it into smaller parts (((3^20)%m)^5) % m It is just modular arithmetic. xariniov9 answered Feb 3, 2019 selected Feb 3, 2019 by Reshu $ingh xariniov9 comment Share Follow See 1 comment See all 1 1 comment reply Reshu $ingh commented Feb 3, 2019 reply Follow Share Thanks @xariniov9 :) 0 votes 0 votes Please log in or register to add a comment.