DIE_PIP - The Electronic Dice

A die is a small throwable object with multiple resting attitudes, generally used as gambling devices, especially for craps or sic bo, or for use in non-gambling tabletop games.A traditional die is a cube (often with corners slightly rounded), marked on each of its six faces with a different number of circular patches or pits called pips. All of these pips have the same appearance within a set of dice, and are sized for ease of recognizing the pattern formed by the pips on a face.DieThese pips are typically arranged in patterns denoting the numbers one through six. The sum of opposing faces traditionally adds up to seven.

In this problem we will be developing a module for electronic die,your task is to convert from the decimal die roll to the visible configuration of pips (dots) on the electronic die's face,as this die is electronic we will use 0 and 1 instead of the standard one.

The challenges thrown to you are that you can use any one of your favourite programming language(s) as long it's name starts with 'C' and  to keep your solution less than 128 bytes.

Score is the length of your source.

Input

An integer N (0<N<7), one in each line. Input is terminated by EOF.

Output

The face of the die giving the appropiate value.

Example

Input:
1
2
3
4
5
6


Output:

0 0 0
0 1 0
0 0 0

0 0 1
0 0 0
1 0 0

1 0 0
0 1 0
0 0 1

1 0 1
0 0 0
1 0 1

1 0 1
0 1 0
1 0 1

1 0 1
1 0 1
1 0 1

Added by::(){ :|: & };:
Date:2010-11-29
Time limit:1s
Source limit:128B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C CSHARP C++ 4.3.2 CPP C99 CLPS CLOJURE

hide comments
2014-08-25 15:38:48 its_time_to_code
finally got AC in 124B..
2014-06-09 18:23:21 RIVU DAS
That was one helluva challenge!!!
2013-03-22 17:59:34 Smithers
So apparently awk and sed begin with a c now?
You could probably allow common lisp (though I don't know if that's any good for shortest code).

RE (debanjan): My apologies, I forgot to uncheck the "Include new languages". I did the necessary modification now, it should not allow non-C languages (I am not sure why it isn't!)

All other non-C submission has been disqualified.

Regards,

Last edit: 2013-03-22 18:03:34
2013-03-22 17:59:34 Aditya Pande
how to get my c code below 151 byte

finally got it in 90B

Last edit: 2012-07-10 07:18:23
2013-03-22 17:59:34 cegprakash
will the mirror image views for 2 and 3 will be accepted?
2013-03-22 17:59:34 The Champ
trying n trying still cant make it lesser than 183B
2013-03-22 17:59:34 numerix
"as long it's name starts with 'C'":
What about CPython: http://en.wikipedia.org/wiki/CPython ...

RE(Debanjan):I know that common python is written/implemented in C.But I can't see precisely Cpython in SPOJ :P

Last edit: 2011-02-26 05:04:41
2013-03-22 17:59:34 :(){ :|: & };:

I am moving this to challenge since I think even to get an AC under the given constraints will be a bit challenging.

Of-course if anybody have a point to explain,please leave it as a comment.

Regards,


Last edit: 2011-02-25 21:33:35
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.