2024/12/4 灵茶题单 位运算

This commit is contained in:
Cool 2024-12-04 21:48:48 +08:00
parent 0784c9f188
commit 6a72586ba4
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package com.cool.ling_cha_mount.bit;
public class Num3226 {
public int minChanges(int n, int k) {
return (n | k) != n ? -1 : Integer.bitCount(n ^ k);
}
}