JAVA 按位异或取模
我必须对整数数组执行按位异或,然后返回模 998244353 的答案。 我已经解决了第一部分,但我陷入了第二部分。我在互联网上搜索,但找不到任何对这种异或运算符和模的组合有用的东西。 请帮忙。
I have to perform bitwise XOR on array of integers and then Return the answer modulo 998244353.
I have solved the first part but I have got stuck in 2nd part. I searched on the internet but couldn't find anything useful for this kind of combination of xor operator and modulo.
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在每次迭代时进行取模运算,
这样,如果数字大于 998244353,则会减少数字。
Try doing the modulo operation on each iteration,
So that, it will reduce the number if the number is greater than 998244353.