Maths problem for you

Teacher: what is 117 + 3?
Pupil: 5!
Teacher: correct

5 Likes

In order for that to be correct you need to take several factors into account

6 Likes

Kindly don't disclose them, let others think about it.

1 Like

I deliberately didn't list them so as to keep others guessing

2 Likes

That's what I was going to say! :sunglasses:

2 Likes

Rather exclamatory response for a student, donchathink?!

1 Like

If A = 117 and B = 3, then A + B should get to 5 ? That is easy:

String A = "117";
String B = "3";

void setup() 
{
  Serial.begin(115200);
  String C = A + B;
  String D = String(A.toInt() / B.toInt());
  int X = sqrt(C.toInt()) / sqrt(D.toInt());
  Serial.println(X);
}

void loop() {}

Try it in Wokwi: Easy - Wokwi ESP32, STM32, Arduino Simulator

2 Likes

Psst, there is no need to guess!

What a โˆš idea.

It's very correct...
Very expert student.

1 Like

There is a very good book about the "skills" of mathematics.

You It shows a series of "mistakes" and also fun math solutions.

He's great for young people.
I think it only exists in Portuguese.

The author tells the story of Beremiz Samir, a traveler with the gift of mathematical calculations, who handles numbers with the ease of an illusionist.

It's called "The Man Who Calculated - Malba Tahan"
( " O homem que calculava - Malba Tahan ")

Ref: O homem que calculava - Malba Tahan

PS: English version:
"https://www.amazon.com.br/Man-Who-Counted-Collection-Mathematical-ebook/dp/B01AH39NNO#:~:text=Malba%20Tahan%20is%20the%20creation,mathematics%20to%20a%20wider%20public."

How droll.

One can do it all logically without any square roots...For example.

const byte A = 117;
const byte B = 3;

void setup() 
{
  Serial.begin(115200);
  byte C = A >> B;
  C = ((C & 0b00001010) >> 3) | (C & 0b00000100);
  Serial.println(C);
}

void loop() {}

Got it! Maybe I am slow as a :snail:, but the hints above did not really help...

I think they were instead meant to obfuscate. :sunglasses:

I don't understand the code examples. It's just:

117 + 3 = 5!

The code to prove that would look like:

Click here for spoiler
int fivePrime;
for int(i=5; i>0; i--){
  fivePrime *= i;
}
if(117+3 == fivePrime){
   Serial.print("Student is correct");
} else {
   Serial.print("Student is incorrect");
}

What do you have to smoke to come up with such a brilliant idea ? :+1:

2 Likes

Sorry. I edited to cover it up.

2 Likes

How about I abuse my moderator powers and edit away the answers that give away how it works? :thinking:

4 Likes

It's bar sport. Do what thou wilt.

3 Likes