We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- HourRank 13
- Sum vs XOR
- Discussions
Sum vs XOR
Sum vs XOR
Sort by
recency
|
38 Discussions
|
Please Login in order to post a comment
include
include
using namespace std; long long int cntvalue(long long int n) { long long int u=0; while(n) { if((n&1)==0) u++; n=n>>1; } return 1<>n; cout<
100% works. C++ solution.
include
include
using namespace std;
long solve(long n) { long k,count = 0; while(n!=0) {
}
int main() { long n; cin >> n; long result = solve(n); cout << result << endl; return 0; }
public static void main(String[] args) { Scanner in = new Scanner(System.in); long n = in.nextLong(); int s=0; for(int i=0;i
My Below code is failing for some test case kindly help me where i did mistake.
public static void main(String[] args) {
My O(1) Solution