You are on page 1of 2

Programming – Output Testers

Check the sample output already included in the problem paper before testing
these outputs.

DNA. Nothing to do with Douglas Noel Adams. Thankfully.

1. AAAAAAAAAAAAAAAAACCCCCCCCGGGGGGGGTTTTTTTTTTTTTTTTT returns
25
2. TGCGTTGTTACGATCGCGTCTCCGTGGCCAGGTGCGATCTAGAAA returns 19
3. TACGGAGTGCGTGATGGCTGCGCGTCGCCATGGTCGTGAGGGAG returns 15

Persian Clock. Made of gold, obviously.

1. 05:46, 23:50, 240 – returns 11:10 (changing days)


2. 12:34, 23:45, 197 – returns 02:11 (occurs after several days)
3. 12:50, 05:21, 125 – returns 12:50 (the clock already shows the correct
time at the beginning and this remains correct for the next 60 seconds,
so currentTime is returned)

Chandra Yawn – The Space Race

1. {IMPOSS, SIBLE, S, IMPOSSIBLE}, IMPOSSIBLE, returns IMPOSSIBLE


2. {A, BA, BAB, AR},
ABABABABABABABABABABABABABABABABABABABABABABABAR, returns
AMBIGUOUS!

www.code-warriors.org
Gridlock'd

1. 0000
0000
returns: 0
2. 00
01
returns: 4
3. 010101011010000101010101
returns: 20
4. 000
000
001
011
returns: 6

www.code-warriors.org

You might also like