如何用模求解方程? [英] How to solve equation with modulo?
本文介绍了如何用模求解方程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在此等式中找到x:
(x + 35)%26 = 21
%是模数.
答案是x =90.
请指教,因为我的数学能力不足以解决此问题.
我知道有一些一致性计算,但是不知道如何在c#中实现.
How to find x in this equation:
(x + 35)%26 = 21
Where % is modulo.
The answer is x = 90.
Please advise, because my math skills are not enough to solve this problem.
I know that there are some congruence computation, but don''t know how to implement it in c#.
推荐答案
(x+35)%26 = x%26 + 35%26 = x%26 + 9
x%26 + 9 = 21 => x%26 = 12 => x = { 0+12, 1*26+12, 2*26+12,...}
下次自己做作业.
Do your own homework next time.
这篇关于如何用模求解方程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文