+ 7

Maths challenge-calculator not useful

Can you find the reminder of the number (2222^5555+5555^2222) during the division with 7?? NOTE: 1. "^" is the symbol for power; 2. If you calculate it directly, the reminder will be 0, because the computer names it as infinite (and the division with every number will be evaluated 0); 3. It is useful to solve it using programming. 1...2...3...START ;)

30th Jun 2017, 8:58 AM
Ledio Deda
Ledio Deda - avatar
54 Antworten
30th Jun 2017, 10:26 AM
Ekansh
+ 6
100% correct ^ is bitwise operator lol.. Updated code
30th Jun 2017, 9:48 AM
jay
jay - avatar
30th Jun 2017, 10:34 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
30th Jun 2017, 9:21 AM
jay
jay - avatar
+ 5
hows that? answer (3)
30th Jun 2017, 9:32 AM
jay
jay - avatar
+ 5
possible!
30th Jun 2017, 9:40 AM
jay
jay - avatar
+ 5
mmhmmm it is a tricksy one
30th Jun 2017, 9:51 AM
jay
jay - avatar
+ 5
lol, so long division
30th Jun 2017, 10:17 AM
jay
jay - avatar
+ 5
not yet, went to pick up the missus. But thought about it whilst I was out.. well u pretty much gave away how to do it ;)
30th Jun 2017, 10:22 AM
jay
jay - avatar
+ 5
Hang on, you saying the result you have is 0?
30th Jun 2017, 10:32 AM
jay
jay - avatar
+ 5
Yes @Jay It's output is 0 (Ruby)
30th Jun 2017, 10:33 AM
Ekansh
+ 5
sooooo... doing it directly does work. fine very misleading
30th Jun 2017, 10:34 AM
jay
jay - avatar
+ 4
ok.. not sure i understand then
30th Jun 2017, 9:35 AM
jay
jay - avatar
+ 4
last try.. i got 1 with changing it to what u typed exactly above
30th Jun 2017, 9:37 AM
jay
jay - avatar
+ 4
I saw it
30th Jun 2017, 9:38 AM
Ledio Deda
Ledio Deda - avatar
+ 4
I think i know what the problem is.. I believe it is not correct to write 2^3 to evaluate the power of 2 in c++
30th Jun 2017, 9:39 AM
Ledio Deda
Ledio Deda - avatar
+ 4
I tried 3^5 and its output was 6
30th Jun 2017, 9:40 AM
Ledio Deda
Ledio Deda - avatar
+ 4
You can use math.h library and pow(a,b) instead...
30th Jun 2017, 9:40 AM
Ledio Deda
Ledio Deda - avatar
+ 4
yes
30th Jun 2017, 9:52 AM
jay
jay - avatar
+ 4
#Ruby ans = (2222**5555+5555**2222) % 7 puts ans #Is I am right ?
30th Jun 2017, 10:24 AM
Ekansh