当前位置:网站首页>A basic lintcode MySQL database problem

A basic lintcode MySQL database problem

2022-07-06 01:47:00 CSDN Q & A

https://www.lintcode.com/problem/1927/solution/42138
Or do it according to normal thinking .
But I saw a person's way of solving problems , I don't understand .
His answer is like this =

UPDATE coins SET side = char(ascii(side)^30)



Take the answer :

Haven't you learned programming ?^ Express exclusive or . Here you are ascii clock :

img


You calculate ,p Of ascii Code is 112,112 Exclusive or 30=110, That is to say n,110 Exclusive or 30=112, That is to say p.

img


img


The inverse operation of XOR is itself .


原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202071006166241.html