We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我们来证明一下此处确实不会发生取到自身的情况,不妨设:pid = (pid+i+1)%size 则 pid+i+1 = a*size+pid。 即:a*size = i+1,其中 a 为整数。由于 i<size,于是 a*size = i+1 < size+1,则: (a-1)*size < 1 ==> size < 1 / (a-1),由于 size 为非负整数,这是不可能的。
(a-1)*size < 1 ==> size < 1 / (a-1) 这段的描述有问题,当 a=1 时是没办法做除法的,源代码的做法并不能保证不取到自身,只能保证最后一个取到自己。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
实际描述
预期描述
附图
The text was updated successfully, but these errors were encountered: