位运算很讨厌...
用Java 算的结果是1
源码: (Calc1.java)
public class Calc1{
public static void main(String args[]) {
int r=0,j=10,i=0;
for(i=1;i<=10;i++) {
r++;
j=j ^ (r-1) ^ j & r + (j ^ r) +j;
XXXXXXXXXXXXXintln("Step "+i+": "+j);
}
XXXXXXXXXXXXXintln("Result:");
XXXXXXXXXXXXXintln(j);
}
}