All Human Ressource Machine problem written in PIET. If you want to write some PIET code, i advise this desktop IDE: https://github.com/dnek/pietron.
Instructions : Drag commands into this area to build a program. Your program should tell your worker to grab each thing from the INBOX, and drop it into the OUTBOX. You got a new command! You can drag JUMP arrow to jump to different lines within your program.
Codel Size : 50
Ex : INBOX : "5 26 12 45 78 23" -> OUTBOX: "52612457823"
Instructions : Ignore the INBOX for now, and just send the following 3 letters to the OUTBOX: B U G
Codel Size : 20
Ex : INBOX : "5 26 12 45 78 23" -> OUTBOX: "BUG"
Instructions : Grab the first TWO things from the INBOX and drop them into the OUTBOX in the reverse order. Repeat until the INBOX is empty.
Codel Size : 50
Ex : INBOX : "5 26 12 45 78 23" -> OUTBOX: "26545122378"
Instructions : For each two things in the INBOX, add them together, and put the result in the OUTBOX.
Codel Size : 50
Ex : INBOX : "5 26 12 45 78 23" -> OUTBOX: "3157101"
Instructions : Send all things that ARE NOT ZERO to the OUTBOX.
Codel Size : 30
Ex: INBOX : "0 2 3 0 14 0 23 0" -> OUTBOX: "231423"
Instructions : For each thing in the INBOX, TRIPLE it. And OUTBOX the result.
Codel Size : 50
Ex : INBOX : "1 2 5 9 3 6 2 45 23" -> OUTBOX: "361527918613569"
Instructions : Send only the ZEROs to the OUTBOX
Codel Size : 30
Ex : INBOX : "0 2 0 6 0 15 0 23" -> OUTBOX: "0000"
Instructions : For each thing in the INBOX, multiply it by 8, and put the result in the OUTBOX.
Codel Size : 50
Ex : INBOX : "1 2 5 3 8 4 9 12" -> OUTBOX: "816402464327296"
Instructions : For each two things in the INBOX, first subtract the 1st from the 2nd and put the result in the OUTBOX. AND THEN, subtract the 2nd from the 1st and put the result in the OUTBOX. Repeat.
Codel Size : 20
Ex : INBOX : "1 2 5 3 8 4 9 12" -> OUTBOX: "1-1-22-443-3"
Instructions : For each thing in the INBOX, multiply it by 40, and put the result in the OUTBOX.
Codel Size : 40
Ex : INBOX : "1 2 5 10 20 12 3" -> OUTBOX: "4080200400800480120"
Instructions : Get two things from the INBOX. If they are EQUAL, put ONE of them in the OUTBOX. Discard non-equal pairs.
Codel Size : 30
Ex : INBOX : "1 1 2 3 4 4 12 12 0 1" -> OUTBOX: "1412"
Instructions : Grab TWO things form the INBOX, and put only the BIGGER of the two in the OUTBOX. If they are equal, just pick either one. Repeat!
Codel Size : 30
Ex : INBOX : "4 7 5 2 12 23 5 5 47 20 28 56 99 99" -> OUTBOX: "75235475699"
Instructions : Send each thing from the INBOX to the OUTBOX, BUT, if a number is negative, first remove its negative sign.
Codel Size : 30
Ex : INBOX : "4 -1 2 -3 5 6 7 -122 1 -13" -> OUTBOX: "4123567122113"
Instructions : For each TWO things in the INBOX:
- Send a 0 to the OUTBOX if they have the same sign. (Both positive or both negative.)
- Send a 1 to the OUTBOX if their signs are different. Repeat until the INBOX is empty.
Codel Size : 30
Ex : INBOX : "-1 1 2 3 -12 5 5 -12 6 2 2 -7 14 -128" -> OUTBOX: "1011011"
Instructions : For each number in the INBOX, send that number to the OUTBOX, followed by all numbers down to (or up to) zero. It's a countdown!
Codel Size : 20
Ex : INBOX : "5 10 2 6 12 3" -> OUTBOX: "543210109876543210210654321012111098765432103210"
Instructions : For each two things in the INBOX, multiply them, and OUTBOX the result. Don't worry about negative numbers for now.
Codel Size : 50
Ex : INBOX : "2 2 4 4 5 3 8 3 7 9 10 6" -> OUTBOX: "41615246360"
Instructions : The INBOX is filled with zero terminated strings! What's that? Ask me. Your Boss. Add together all the numbers in each string. When you reach the end of a string (marked by a ZERO), put your sum in the OUTBOX. Reset and report for each string.
Ex : INBOX : "2 3 5 4 6 0 1 3 2 6 5 0 2 3 0 1 0 12 23 0" -> OUTBOX: "20175135"