# A simple children's riddle

Here is a riddle written on a cup:

Eh is four times as much as Oi,

Oh is four times as little as Ai,

What do you get if you add all four of them up?

Source: Russian Olympiad Problems, Math Circle (Beginner) 2018 PDF Q6

• Welcome to Puzzling, seems a nice question!
– Tom
Apr 28, 2020 at 15:35
• Old Macdonald ? Apr 28, 2020 at 15:42
• Appears to be from the 2018 russian olympiad (Q6) Apr 28, 2020 at 15:59
• This surely seems too broad, unless the cup part is important somehow... but I'm of the opinion it's just for rhyming purposes Apr 28, 2020 at 16:55
• @BeastlyGerbil Oh I didn't know that! I was told it by a friend. Good find.
– Simd
Apr 28, 2020 at 17:24

Writing equations from the poem:

$$EH = 4 \times OI$$
$$AI = 4 \times OH$$

So we know that O is

1 or 2

And then we have

$$H \times 4 = xI$$
$$I \times 4 = xH$$

So H and I are

(2,8), (4,6), (6,4), or (8,2)

So OH is

12, 14, 16, 18, 24, 26, or 28

and AI is

48, 56, ~64~, 72, 96, ~104~, or ~112~ (~crossing out~ the ones that duplicate digits or are three digits)

So (OH,AI,OI) are

(12,48,18), (14,56,16), (18,72,12), or (24,96,26)

Then (OH,AI,OI,EH) are

(12,48,18,72), ~(14,56,16,64)~, (18,72,12,48), or ~(24,96,26,104)~ again ~crossing out~ the ones that duplicate digits or are three digits

Which leaves

(12,48,18,72) or (18,72,12,48)

So the sum is

150 no matter which of these you choose

• I don't understand the first line of your solution. Why can't O be 0?
– Simd
Apr 28, 2020 at 21:32
• We don't typically write numbers starting with 0, but I guess you could create a solution where O is 0 if you wanted to. Apr 28, 2020 at 22:17

I and H are both even, and, from the rhyme, I+H=10 is easy to deduce. Also O=1 or O=2. But if O=2, then one of OH, OI is greater than $$25$$. so O=1. The riddle asks for EH+OI+OH+AI=5(OI+OH)=150.

• How are you using the rhyme exactly?
– Simd
May 1, 2020 at 8:24
• @Anush; $4i\equiv h \pmod{10}$ and $4h\equiv i \pmod{10}$ gives you $h,i\equiv 0 \pmod2$. Adding gives $3(i+h)\equiv 0 \pmod{10} \implies i+h\equiv 0 \pmod{10}$.
– JMP
May 1, 2020 at 8:34

We have Eh = 4Oi, Ai = 4Oh, which constrains the smaller values to the range 10..25.

So i = 16h, mod 10, which has 2 solutions 0 (reject so that i $$\neq$$ h), and i = 6.

With the above constraint on Oi, O=1, so Oi = 16, Eh = 64, Oh = 14, and Ai = 56.

The sum of the 4 2-digit numbers is then 150.