index
:
datalab2026
master
RUC ICS 2026 Datalab: Binary Representation and Bitwise Operations
about
summary
refs
log
tree
commit
diff
log msg
author
committer
range
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
-rw-r--r--
bits.c
2
1 files changed, 1 insertions, 1 deletions
diff --git a/bits.c b/bits.c
index 09baed2..e283be3 100644
--- a/
bits.c
+++ b/
bits.c
@@ -19,7 +19,7 @@
* Difficulty: 1
*/
int bitAnd(int x, int y) {
- return 2;
+ return (~((~x)|(~y)));
}
/*