Convert 367 to Egyptian form

In Egyptian numerals, there are characters to represent 1,10,100, etc.

See for a list:
http://en.wikipedia.org/wiki/Egyptian_numerals

Multiples are represented by duplicating the symbols (up to 9 times).

Say
X=1
Y=10
Z=100

then
245 would be written as
ZZYYYYXXXXX
or
ZZ
YYYY
XXXX
or even
XXXXXYYYYZZ
As the writing could be interpreted left-to-right or right-to-left. The distinct symbols make the value clear, without the notion of positions.

To convert a number to Egyptian form, we need to express it as a sum of unique unit fractions (where the numerator is always 1). Here's how you can convert 367 to Egyptian form:

1. Start by finding the largest possible unit fraction less than or equal to the given number. In this case, the largest unit fraction is 1/2 because 1/2 = 0.5 ≤ 367.

2. Subtract the chosen unit fraction from the given number. 367 - 1/2 = 366.5.

3. Repeat the process with the fractional part obtained. Consider the largest unit fraction that is less than or equal to the fractional part (excluding the unit fraction already used). In this case, the largest unit fraction is 1/3 because 1/3 = 0.3333... ≤ 0.5.

4. Subtract the chosen unit fraction from the fractional part. 366.5 - 1/3 = 366.1667.

5. Continue this process until the remaining fractional part becomes zero or close to zero.

6. Keep track of all the chosen unit fractions. In this case, the Egyptian form of 367 will be 1/2 + 1/3 + ... (continue the process until the remaining fractional part is zero or close to zero).

Note that calculating the Egyptian form manually can be a lengthy process. In this case, the Egyptian form of 367 may require multiple fractions to approximate the exact value.