This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: that the earliest lexigraphically shall be the canonical number. (Their lexigraphical ordering was the same as ASCII, amazingly). The length includes all characters, including a single space that follows each digit or operation but the last. Thus, the shortest possible representations of 13 are: r three ten + four nine + six seven + seven six + nine four + ten three + and of these, four nine + is the earliest and thus canonical representation of 13. Your task is to translate numbers from our Arabic representation to the canonical Pagong representation. Each input number will be on a line by itself, and the output Sheet1 Page 2 should consist of lines each containing just one canonical Pagong number. All numbers will be 1000 or less, and there will be fewer than five hundred numbers in the input set. Sample input: 5 101 64 Sample output: five one ten ten * + eight eight *...
View
Full
Document
This note was uploaded on 04/29/2011 for the course IT 201 taught by Professor K.v.arya during the Spring '11 term at IIT Kanpur.
 Spring '11
 k.v.arya

Click to edit the document details