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.These 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
hide comments
its_time_to_code:
2014-08-25 15:38:48
finally got AC in 124B.. |
|
RIVU DAS:
2014-06-09 18:23:21
That was one helluva challenge!!! |
|
Smithers:
2013-03-22 17:59:34
So apparently awk and sed begin with a c now?
|
|
Aditya Pande:
2013-03-22 17:59:34
how to get my c code below 151 byte
|
|
cegprakash:
2013-03-22 17:59:34
will the mirror image views for 2 and 3 will be accepted?
|
|
The Champ:
2013-03-22 17:59:34
trying n trying still cant make it lesser than 183B |
|
numerix:
2013-03-22 17:59:34
"as long it's name starts with 'C'":
|
|
:(){ :|: & };::
2013-03-22 17:59:34
|
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 |