Rule 30
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
Implement the cellular automation given by one generation of "rule 30." Strip dead cells (spaces) from beginning and end.
Each new cell is determined by the previous cell in the same spot and its two neighbors:
<pre>"###" -> " "
"## " -> " "
"# #" -> " "
"# " -> "#"
" ##" -> "#"
" # " -> "#"
" #" -> "#"
" " -> " "</pre>
See <a href="http://mathworld.wolfram.com/Rule30.html">http://mathworld.wolfram.com/Rule30.html</a> for more information.
Options
exec is denied
now post-mortem time, all source codes will be revealed
Sample input:_
## # #
Sample output:
## #### ###
Sample input:_
######## # # # # # # # ## ## ## ## ## # # # # #
Sample output:
## # ## # # # # # ## ## # # # # # ###############
Sample input:_
#### # ##### ## ### ##### ### ## # # # # # # ## ### # # # # ## ### # # # ### # ### ### ## ### ### # # # ###### # # # # # # # # # # ### #### ##### ### # ## # # # ## # # # ##### ### # # # # ### # #### # # # # #### # #### # # # # ## # # ### ## # #### ### ## # #### ## ### # # # ### ## ##### ## # ## # # # ## # # # # # # ####### ## #### #### # ### # ## ## ##### ######### ### ## ### ## ##### ###### # # # # ## ## # ## # ### ## #### # # # ##### ## ## #### ##### ## ### ## ####### ## ### ## ## ## # # # # ## ### # # # # # ### # # # # ########## # # # # # ##### ## ### ### #### # # #### ### ## # ## #### ##### ### # ### # ## # # ####### ## ## ### ### ### ### ##### # #### # # # #### # # # # # # # ### ## # #### # # #
Sample output:
## #### ## ### ### # # # #### ### ## ## ### ## # # ### ## ## # # # # # ## ## #### ## ### # ## ### # # ## ## ##### #### ### ### ## # ## ## # ## ## # ### # # ## #### ## ## ## ## ## ######## # ## # ##### # ## ## # ## # # ## ## ##### # ## ## # ## ##### ### ## ### # # # ## ## # ## ### ###### # ## # ## ####### # # ## # # # # #### #### #### ######### ## # # # # ### # # # # ### # # ### # ## ### # ## # ## # # ### ## ##### ## # ## #### #### # ## # ## ### ## ### ## ### # # ## ### ### # # # # # ## ### # ### ## ## ## ### ## ### ##### ## ##### ## ##### ### ## # # ### ## # # ## ## # # ## # ### ## ## # ### # ## ## ## # ### # ## # # #### ## #### # ### # ### # ## # ## ### # # ### ## ## ## # # # ## ## ## ## # # # # # ##### ### #####
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | flagitious | 44 | 0.4442 | 2007/05/12 00:49:33 | 0B / 24B / 18B |
2 | ySas | 45 | 0.2900 | 2007/05/09 18:16:11 | 0B / 13B / 32B |
3 | Mark Byers | 47 | 0.5242 | 2007/05/09 06:00:33 | 0B / 15B / 30B |
4 | shinh | 49 | 0.4560 | 2007/05/08 14:57:50 | 0B / 14B / 31B |
5 | ksk | 51 | 0.3594 | 2007/05/09 23:12:08 | 0B / 24B / 24B |
6 | flagitious(sym) | 53 | 0.3084 | 2007/05/12 08:36:54 | 0B / 4B / 47B |
7 | eban | 65 | 0.4058 | 2007/05/14 02:22:10 | 0B / 21B / 35B |
8 | leonid (flag) | 42 | 0.0330 | 2010/09/10 09:50:07 | 0B / 23B / 18B |
9 | Mark Byers | 44 | 0.2900 | 2007/05/16 14:39:28 | 0B / 10B / 34B |
10 | Servo | 60 | 0.3520 | 2007/06/08 14:24:07 | 0B / 21B / 36B |
11 | tabasa | 116 | 0.0972 | 2007/11/15 16:35:20 | 0B / 50B / 61B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kt3k | 70 | 0.3287 | 2007/05/11 23:20:54 | 0B / 22B / 40B |
2 | Mark Byers | 71 | 0.3337 | 2007/05/09 06:09:04 | 0B / 30B / 31B |
3 | zetamatta | 73 | 0.3588 | 2007/05/09 10:58:05 | 0B / 32B / 31B |
4 | flagitious | 78 | 0.3177 | 2007/05/12 05:07:34 | 0B / 34B / 32B |
5 | SeeNoEvil | 83 | 0.3324 | 2007/05/11 07:24:55 | 0B / 41B / 29B |
6 | mskzzzz | 89 | 0.3910 | 2007/05/13 00:02:27 | 0B / 34B / 40B |
7 | Mark Byers | 67 | 0.3200 | 2007/05/14 14:01:23 | 0B / 22B / 36B |
8 | user_1 | 70 | 0.0928 | 2020/11/29 07:38:20 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ant | 64 | 0.1374 | 2022/04/01 18:28:42 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | primo | 69 | 0.1081 | 2012/01/07 20:33:40 | 1B / 28B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kozima | 110 | 1.4213 | 2007/05/13 23:36:05 | 0B / 47B / 50B |
2 | kozima | 101 | 0.2444 | 2007/09/26 15:59:27 | 0B / 44B / 47B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | nn | 65 | 0.1131 | 2012/05/24 23:25:48 | 0B / 36B / 25B |
2 | murky-satyr | 71 | 0.0938 | 2007/09/19 07:08:07 | 0B / 31B / 36B |
3 | Tomac | 109 | 0.0098 | 2011/09/28 20:57:17 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | zzo38 | 74 | 0.1235 | 2011/05/14 09:46:22 | 0B / 44B / 12B |
2 | 51b | 80 | 0.1000 | 2007/12/08 01:17:24 | 0B / 50B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | 51b | 133 | 0.8935 | 2007/12/10 19:13:53 | 0B / 57B / 64B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | I., S.(pooq) | 39 | 0.1005 | 2011/10/29 23:22:34 | 0B / 11B / 27B |
2 | I., S. | 42 | 0.1170 | 2011/02/27 21:29:50 | 0B / 14B / 25B |
3 | pooq | 53 | 0.1891 | 2009/10/01 11:47:00 | 0B / 13B / 38B |
4 | medialuna | 94 | 0.0791 | 2014/08/26 05:28:38 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | m.ukai | 77 | 0.0887 | 2007/05/11 15:58:35 | 0B / 35B / 38B |
2 | hinoe(another) | 77 | 0.0851 | 2007/05/13 17:28:28 | 0B / 39B / 37B |
3 | shinh | 78 | 0.0766 | 2007/05/08 16:57:27 | 0B / 39B / 36B |
4 | 51b | 95 | 0.0889 | 2007/05/12 17:38:12 | 0B / 50B / 44B |
5 | hinoe | 104 | 0.1056 | 2007/05/13 18:16:54 | 0B / 51B / 50B |
6 | 7gyou | 107 | 0.0751 | 2007/05/08 23:35:07 | 0B / 54B / 52B |
7 | tails (hinoe) | 61 | 0.4001 | 2021/06/17 13:55:24 | 0B / 38B / 23B |
8 | hinoe | 66 | 0.0897 | 2007/05/15 21:22:00 | 0B / 38B / 28B |
9 | 51b | 75 | 0.0874 | 2007/05/14 17:16:17 | 0B / 37B / 35B |
10 | inaniwa | 192 | 0.0012 | 2009/12/19 22:05:26 | 11B / 70B / 76B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | 51b | 87 | 0.0406 | 2007/12/08 01:18:36 | 0B / 58B / 26B |
2 | 51b | 89 | 0.0680 | 2007/12/08 01:36:12 | 0B / 55B / 30B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ksk | 93 | 0.6247 | 2007/05/13 13:23:27 | 0B / 49B / 39B |
2 | m.ukai | 94 | 0.2814 | 2007/05/11 15:10:06 | 0B / 49B / 35B |
3 | ksk | 92 | 0.2617 | 2007/05/14 06:50:39 | 0B / 46B / 38B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | notogawa | 80 | 0.1185 | 2007/05/13 18:28:15 | 0B / ?B / ?B |
2 | moriA | 80 | 0.1006 | 2007/05/14 01:59:35 | 0B / 31B / 39B |
3 | notogawa | 72 | 0.1242 | 2007/05/14 20:57:12 | 0B / 27B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | D | 166 | 0.1890 | 2007/05/08 15:08:08 | 0B / 101B / 46B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | uru | 121 | 0.1566 | 2009/07/08 21:41:25 | 0B / 66B / 46B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | yamaya | 61 | 0.0670 | 2007/05/09 21:59:58 | 0B / 19B / 38B |
2 | zetamatta | 91 | 0.1576 | 2007/05/09 11:43:06 | 0B / 38B / 48B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | emoken | 58 | 0.0971 | 2007/05/11 20:54:50 | 0B / 5B / 42B |
2 | shinh | 60 | 0.0988 | 2007/05/08 15:41:31 | 0B / 9B / 34B |
3 | tails | 50 | 0.0446 | 2021/06/17 11:13:36 | 0B / 12B / 33B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | McBusLuck | 37 | 0.0199 | 2020/09/04 04:07:34 | 0B / 12B / 24B |
2 | yamaya | 76 | 0.3894 | 2010/10/24 14:54:13 | 0B / 28B / 41B |
3 | tabasa | 125 | 0.1282 | 2007/11/15 16:40:03 | 0B / 55B / 64B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ySas | 57 | 0.8774 | 2007/05/13 21:10:58 | 19B / 18B / 17B |
2 | yshl(bin) | 89 | 0.8552 | 2007/05/13 09:39:28 | 34B / 31B / 23B |
3 | yshl | 164 | 0.8590 | 2007/05/13 09:39:16 | 0B / 117B / 22B |
4 | ySas | 53 | 1.0976 | 2007/05/14 17:16:05 | 14B / 13B / 24B |
5 | yshl(bin) | 53 | 0.5613 | 2007/12/08 02:17:23 | 28B / 15B / 9B |
6 | ySas(not bin) | 77 | 1.1210 | 2007/05/14 17:16:40 | 0B / 47B / 22B |
7 | yshl | 91 | 1.0830 | 2007/05/14 15:17:32 | 0B / 63B / 16B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ySas | 37 | 0.0933 | 2007/05/11 17:53:15 | 0B / 10B / 21B |
2 | Mark Byers | 29 | 0.1373 | 2007/05/17 00:27:05 | 0B / 6B / 22B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 14 | 0.3303 | 2021/06/17 14:32:16 | 6B / 6B / 2B |
2 | whio | 18 | 0.3063 | 2017/02/16 01:32:21 | 8B / 6B / 3B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | irori | 228 | 0.0197 | 2007/05/13 01:13:32 | 0B / 109B / 118B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | 51b | 308 | 0.1482 | 2008/10/05 17:23:01 | 0B / 158B / 150B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | *yuko* | 20 | 0.1327 | 2012/03/05 03:21:53 | 14B / 4B / 2B |
2 | kik | 21 | 0.1385 | 2007/12/31 00:54:42 | 15B / ?B / ?B |
3 | yaneurao | 25 | 0.6784 | 2007/12/30 16:02:00 | 16B / ?B / ?B |
4 | kodera | 26 | 0.6838 | 2007/12/19 02:00:03 | 17B / 4B / 4B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | nn | 58 | 0.2929 | 2010/01/22 17:46:47 | 4B / 23B / 21B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | gs2 | tails | 14 | 10000 |
2 | z80 | *yuko* | 20 | 7000 |
3 | GolfScript | flagitious | 24 | 5833 |
4 | Befunge | Mark Byers | 29 | 4827 |
5 | Perl | tails (ySas,teebee) | 34 | 4117 |
6 | Bash | McBusLuck | 37 | 3783 |
7 | goruby | murky-satyr | 39 | 3589 |
8 | J | I., S.(pooq) | 39 | 3589 |
9 | Ruby | leonid (flag) | 42 | 3333 |
10 | sed | tails | 50 | 2800 |
11 | Postscript | ySas | 53 | 2641 |
12 | Vim | nn | 58 | 2413 |
13 | AWK | yamaya | 61 | 2295 |
14 | C | tails (hinoe) | 61 | 2295 |
15 | Groovy | murky-satyr | 64 | 2187 |
16 | Python3 | ant | 64 | 2187 |
17 | JavaScript | nn | 65 | 2153 |
18 | Python | Mark Byers | 67 | 2089 |
19 | PHP | primo | 69 | 2028 |
20 | Haskell | notogawa | 72 | 1944 |
21 | Forth | zzo38 | 74 | 1891 |
22 | Bash (builtins) | tails (McBusLuck) | 75 | 1866 |
23 | Lua | murky-satyr | 85 | 1647 |
24 | D | 51b | 87 | 1609 |
25 | BASIC | *yuko* | 87 | 1609 |
26 | OCaml | ksk | 92 | 1521 |
27 | Io | murky-satyr | 99 | 1414 |
28 | Smalltalk | murky-satyr | 100 | 1400 |
29 | Common LISP | kozima | 101 | 1386 |
30 | Fortran | *yuko* | 104 | 1346 |
31 | Scheme | murky-satyr | 114 | 1228 |
32 | Tcl | murky-satyr | 117 | 1196 |
33 | Pascal | uru | 121 | 1157 |
34 | Erlang | 51b | 133 | 1052 |
35 | Prolog | mskzzzz | 147 | 952 |
36 | C# | siokoshou | 160 | 875 |
37 | Ada | D | 166 | 843 |
38 | Unlambda | irori | 228 | 614 |
39 | Lazy-K | 51b | 308 | 454 |
Referer
Note that, they may contain spoilers.
return to the top page