#!/usr/athena/bin/perl
use warnings;
use strict;

sub dumpbits (@) {
  print join('', map !defined $_ ? '?' : $_ ? '1' : '0', @_), "\n";
}

sub variant ($) {
  my (@bits) = (undef) x 40;
  #dumpbits(@bits);

#  1. The only way to get the intended magic word is to chop up the forty
#     answers into four equal groups, interpreting each as a letter using
#     a ten-bit encoding
#  2. The only way to get the intended magic word is to chop up the forty
#     answers into five equal groups, interpreting each as a letter using
#     an eight-bit encoding
#  3. The only way to get the intended magic word is to chop up the forty
#     answers into eight equal groups, interpreting each as a letter
#     using a five-bit encoding

  # [1..3] can logically be 100, 010, 001, 000
  #my $encoding = possible(4);
}

variant 0;

__END__

#  4. The statement listed three statements prior to this one is true.

#  5. Of the statements that read "The statement listed three statements
#     prior to this one is true", at least two are true.

#  6. The statement listed three statements prior to this one is true.

#  7. The statement listed three statements prior to this one is true.

#  8. Exactly one-sixth of the true statements occur between the first
#     statement and this one, inclusive.

#  9. There is a sequence of four consecutive false answers, but there
#     are no longer sequences.

# 10. There is a sequence of five consecutive false answers, but there
#     are no longer sequences.

# 11. There is a sequence of six consecutive false answers, but there
#     are no longer sequences.

# 12. Of the statements numbered with a multiple of twelve, an odd
#     number are true.

# 13. Of the statements numbered with a multiple of thirteen, an even
#     number are true.

# 14. Of the previous statement and the next statement, exactly one is
#     true.

# 15. The next statement would be just as true as it is now if it were
#     replaced with: "Each statement that begins with the phrase
#     'Exactly one-sixth' is true".

# 16. The previous statement would be just as true as it is now if it
#     were replaced with: "Each statement that begins with the phrase
#     'Exactly one-sixth' is true".

# 17. This very statement would be just as true as it is now if it were
#     replaced with: "Each statement that begins with the phrase
#     'Exactly one-sixth' is true".

# 18. Every statement whose number yields a remainder of three when
#     divided by six is false.

# 19. Of the previous statement and the next statement, exactly one is
#     true.

# 20. Exactly half of the true statements occur between the first
#     statement and this statement, inclusive.

# 21. The previous statement and the next statement are either both true
#     or both false.

# 22. There are more true statements in the last quarter of this list
#     than there are in the first quarter.

# 23. There are more true statements in the last quarter of this list
#     than there are in the second quarter.

# 24. Of this statement and the two previous statements, an odd number
#     are true.

# 25. When I told three people the magic word and asked which of the
#     five Zenner card symbols came to mind, a majority of them chose
#     the square.

# 26. When I told three people the magic word and asked which of the
#     five Zenner card symbols came to mind, a majority of them chose
#     the three wavy lines.

# 27. When I told three people the magic word and asked which of the
#     five Zenner card symbols came to mind, a majority of them chose
#     the circle.

# 28. When I told three people the magic word and asked which of the
#     five Zenner card symbols came to mind, a majority of them chose
#     the star.

# 29. This statement is part of the strictly longest consecutive stretch
#     of true statements.

# 30. Of the statements numbered with a multiple of six, exactly
#     one-half are true.

# 31. Of this statement and the two that follow, exactly one is true.

# 32. Of the statements numbered with a power of two, exactly half are
#     true.

# 33. The statement listed ten statements prior to this one is true.

# 34. If the previous two statements are listed in the reverse order
#     and all statements retain their truth values, then the result is
#     still consistent.

# 35. Of the statements numbered with a multiple of seven, exactly one
#     is true.

# 36. Of the statements numbered with a multiple of nine, none are true.

# 37. The thirtieth statement is as true as this statement.

# 38. Exactly one-sixth of the true statements occur between this
#     statement and the last statement, inclusive.

# 39. Both this statement and the next one are true.

# 40. Exactly one-half of the statements numbered with a multiple of
#     five are true.
