Click to See Complete Forum and Search --> : Easy Puzzle Mountain problem, it is not easy


wtt
03-27-2007, 05:32 PM
Hello everyone,

Did you guys work on UTF-8 before? If so, could you take a look at the problem below. I'd like to hear your thoughts about tackling this kind of problems.

It is about the software internalization. I couldn't find the specific group to ask, so I ask here and I hope you don't mind.

////////////////////////////////////
//////////////
////////////
Easy Puzzle Mountain

Part 1:
How many bytes long is the sequence for the code point whose UTF-8 representation begins with 0xE3?


Part 2:

0xA9 0xE3 0xB4 0xB1 0x54 0x98 0xB4 0x77
0x88 0x01 0xB2 0x8E 0x5D 0xAA 0xBB 0x66
0x9A 0xC4 0xB2 0x3F 0x8C 0xA3 0xDF 0xA0
0x90 0x4A 0x83 0x90 0x00 0xA2 0xA7 0x94
0x83 0x5C 0x5B 0x86 0x91 0xBF 0xAA 0x60
0xA1 0x47 0x89 0xB2 0xC4 0x89 0x50 0x99



Decode the puzzle and send the answer to Part 1

MrCoder
03-27-2007, 09:09 PM
Surely it can be 8, 16 or 32 bytes long since 0xE3 could be the first byte in each of these?

mikekirk102
03-27-2007, 11:08 PM
I am sure there is only one or two people here that know WTF' they are talking about. It is like calling your ISP and they ask you to re-boot.

MrCoder
03-28-2007, 04:34 AM
I am sure there is only one or two people here that know WTF' they are talking about. It is like calling your ISP and they ask you to re-boot.

What are you talking about?

jrcjc
03-31-2007, 12:38 AM
think it is 3 bytes

from UTF-8 wiki page

1110xxxx(E0-EF) 10yyyyyy 10zzzzzz

first byte begins with 1110, the following bytes begin with 10.

0xE3 = 11100011

makzan
05-29-2007, 08:23 AM
Part 2:

0xA9 0xE3 0xB4 0xB1 0x54 0x98 0xB4 0x77
0x88 0x01 0xB2 0x8E 0x5D 0xAA 0xBB 0x66
0x9A 0xC4 0xB2 0x3F 0x8C 0xA3 0xDF 0xA0
0x90 0x4A 0x83 0x90 0x00 0xA2 0xA7 0x94
0x83 0x5C 0x5B 0x86 0x91 0xBF 0xAA 0x60
0xA1 0x47 0x89 0xB2 0xC4 0x89 0x50 0x99



OK, this may sound a bit stupid and I certainly don't know a lot about this, but I've seen code laid out similar to that which displays a nursery rhyme (or something similar) if coded in C++.

Remember, the facebook guys are extremely clever and good at what they do, so the puzzles will be hard.

fejesjoco
12-18-2007, 02:18 PM
I solved it:
http://jocohp.hu/?o=user_post&id=59&l=1