+ 2

Challenges for C/C++

Anybody who wants a brain rush can post a tricky challenge for C/C++ languages.

14th Aug 2017, 5:31 PM
Akhil Manchanda
Akhil Manchanda - avatar
3 Respostas
+ 2
*DAILY CHALLENGE* : Given a positive number Write a code that calculates all 'quark-pairs' from 1 .. n! TASK: A 'quark-pair' is an integer pair. First you have to convert a number x into binary and count the 1's. Now multiply the number of 1's with x and store the product. We call two numbers a 'quark-pair' if their products are equal! EXAMPLE: x = 22 bin(22) = 10110 count = 3 product = 22*3 = 66 y = 33 bin(33) = 100001 count = 2 product = 33*2 = 66 products are equal... ---> (x,y) are 'quark-pairs' !!! HAVE FUN !!!
14th Aug 2017, 5:34 PM
Akhil Manchanda
Akhil Manchanda - avatar
+ 2
what's tht X86 emulator ??
13th Sep 2017, 2:59 PM
Akhil Manchanda
Akhil Manchanda - avatar