Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(A*B)>0如果 A 和 B 很大,则无法检查条件。如何查找检查此条件是否(A,B)存在-2147483648于2147483647
(A*B)>0
(A,B)
-2147483648
2147483647
只要解决方案是最优的
只需将结果除以一个操作数(除非它为零),然后检查除法的结果是否是另一个操作数。