L system

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Implement an L-system evaluator. The input is an initial string, a set of substitution rules, and the number of iterations. The program should print the string at each iteration.

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

4
A
A AB
B A

Sample output:

A
AB
ABA
ABAAB
ABAABABA

Sample input:_

7
A
A B
B AB

Sample output:

A
B
AB
BAB
ABBAB
BABABBAB
ABBABBABABBAB
BABABBABABBABBABABBAB

Sample input:_

2
F
F F+F-F-F+F

Sample output:

F
F+F-F-F+F
F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1Histocrat620.04202015/06/24 00:33:200B / 28B / 31B
2leonid630.15912008/07/23 11:59:090B / 20B / 40B
3clock630.05442012/08/25 12:02:170B / 20B / 40B
4murky-satyr650.00232009/12/29 13:51:110B / 32B / 30B
5flagitious(semi embed)670.21682007/06/02 09:13:000B / 34B / 28B
6eban680.24692007/05/14 01:03:460B / 30B / 36B
7yowa830.18552007/09/09 14:59:160B / 34B / 47B
8shinh860.24752007/03/10 14:49:540B / 34B / 43B
9bk1e900.04682011/06/07 15:55:160B / 56B / 29B
10tabasa1730.20552007/10/02 12:30:359B / 92B / 54B

Ruby2 _

RankUserSizeTimeDateStatistics
1Histocrat550.21462016/09/29 14:21:250B / 28B / 23B

Perl _

RankUserSizeTimeDateStatistics
1ySas510.18402007/08/31 00:50:390B / 19B / 30B
2llhuii510.04392016/02/25 00:29:320B / 24B / 24B
3tybalt89520.16802007/03/15 00:17:560B / ?B / ?B
4tails520.02602011/05/14 15:47:270B / 23B / 27B
5leonid560.07342008/08/19 11:41:080B / 20B / 35B
6Mithran790.12512007/03/10 15:26:440B / ?B / ?B
7eban820.14092007/03/10 18:18:170B / 27B / 55B
8Hem1250.00512011/10/09 16:22:140B / 52B / 73B

Python _

RankUserSizeTimeDateStatistics
1leonid920.09362014/05/30 14:23:300B / 52B / 35B
2twobit990.10042014/03/18 09:07:190B / 49B / 48B
3hallvabo1000.09702014/03/10 14:12:400B / 43B / 56B
4recursive1050.08092011/02/02 08:16:080B / 52B / 48B
5Mark Byers1180.32532007/04/15 23:18:420B / 66B / 43B
6Defenestrator1290.33832007/03/19 09:17:240B / 84B / 37B
7rolf1340.12572013/10/10 04:52:120B / 65B / 63B
8mskzzzz1380.31282007/04/15 22:33:370B / 77B / 43B
9SeeNoEvil1401.83252007/03/11 16:58:300B / 75B / 48B

PHP _

RankUserSizeTimeDateStatistics
1o-cn970.06262009/12/07 22:37:2448B / ?B / ?B

Scheme _

RankUserSizeTimeDateStatistics
1ma1682.09822007/03/11 15:21:240B / ?B / ?B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima1670.42082007/05/18 00:44:330B / 97B / 66B

Arc _

RankUserSizeTimeDateStatistics
1clock902.69492012/10/19 13:21:370B / 61B / 22B
2murky-satyr1063.77582009/12/29 19:00:160B / 47B / 44B

Io _

RankUserSizeTimeDateStatistics
1murky-satyr1592.42122008/08/06 00:53:270B / 102B / 42B

JavaScript _

RankUserSizeTimeDateStatistics
1nn960.12072008/08/19 21:34:270B / 44B / 51B
2murky-satyr960.14902008/08/20 00:20:210B / 46B / 48B
3nn(1.9)990.00382010/03/16 22:14:140B / 48B / 48B
4Dashiva1220.13032007/04/21 22:50:470B / 67B / 52B

Lua _

RankUserSizeTimeDateStatistics
1twobit930.04182012/03/09 09:42:110B / 54B / 31B
2Hendrik950.03252013/09/12 22:29:230B / 53B / 34B
3planque1090.09322007/06/20 12:44:340B / 59B / 39B

Tcl _

RankUserSizeTimeDateStatistics
1clock1070.04742012/08/26 11:57:380B / 68B / 18B

Icon _

RankUserSizeTimeDateStatistics
1clock1250.04982012/04/15 19:18:150B / 66B / 52B

REXX _

RankUserSizeTimeDateStatistics
1clock1290.04472012/11/15 13:05:350B / 82B / 20B

Smalltalk _

RankUserSizeTimeDateStatistics
1murky-satyr1600.52842008/07/13 12:34:030B / 96B / 52B

Prolog _

RankUserSizeTimeDateStatistics
1mskzzzz2350.23042007/05/13 00:22:170B / 148B / 70B

BASIC _

RankUserSizeTimeDateStatistics
1poop1850.42462007/09/10 16:19:020B / 124B / 43B

J _

RankUserSizeTimeDateStatistics
1I., S.540.14732012/06/01 06:18:260B / 35B / 17B

C _

RankUserSizeTimeDateStatistics
17gyou1180.05952007/12/22 14:02:140B / 59B / 59B
2letter1210.05502007/12/21 23:52:010B / 63B / 58B
3hinoe1510.04822007/04/16 00:12:560B / 70B / 80B
4moriA1730.08852007/03/12 12:39:240B / 83B / 89B

OCaml _

RankUserSizeTimeDateStatistics
1ksk(embed)1740.52782007/06/01 22:52:020B / 110B / 49B
2m.ukai(embed)1760.27752007/03/13 13:16:200B / 89B / 72B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa940.03292012/07/19 00:39:590B / 48B / 41B
2henkma940.03902012/07/22 21:32:300B / 48B / 41B
3rst76980.00172010/03/09 12:06:060B / 59B / 36B
4Lost_dog980.03172010/04/04 00:39:400B / 60B / 35B
5Magnus Jonsson990.12552007/03/16 14:26:330B / 53B / 44B
6moriA1130.08132007/03/31 18:02:130B / 63B / 46B
7konn1410.10122007/03/10 14:30:500B / ?B / ?B
8yy1480.03862012/07/18 19:15:041B / ?B / ?B
9wa3940.03482012/07/19 00:44:1515B / ?B / ?B

Pascal _

RankUserSizeTimeDateStatistics
1uru2100.06172009/04/17 00:48:280B / 144B / 49B
2pooq2300.09752009/01/26 09:45:220B / 159B / 51B

AWK _

RankUserSizeTimeDateStatistics
1llhuii690.04002016/02/25 01:23:280B / 36B / 33B
2nn840.00152010/01/07 13:56:120B / 45B / 38B
3yamaya910.00122010/01/06 23:21:210B / 41B / 50B
4krokofant1570.16102007/03/10 06:55:250B / ?B / ?B

sed _

RankUserSizeTimeDateStatistics
1emoken(embed)1290.09622007/03/10 13:44:230B / 33B / 88B
2emoken1850.11062007/03/10 13:44:490B / 54B / 104B

Bash _

RankUserSizeTimeDateStatistics
1Gus1290.90012007/05/21 11:40:040B / 69B / 28B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii690.04912016/02/25 01:30:290B / 36B / 33B

Postscript _

RankUserSizeTimeDateStatistics
1ySas960.88342007/05/29 01:27:5734B / 31B / 30B

R _

RankUserSizeTimeDateStatistics
1pooq1710.45142013/03/25 17:23:350B / 115B / 43B

GolfScript _

RankUserSizeTimeDateStatistics
1tails320.16622012/03/09 17:34:150B / 2B / 30B
2narb420.15122010/09/06 21:50:230B / ?B / ?B
3flagitious470.36902007/12/16 07:44:390B / 10B / 36B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs230.25692015/11/07 15:08:3312B / 5B / 6B

Universal Lambda _

RankUserSizeTimeDateStatistics
1hinoe950.48552009/03/22 23:33:0773B / 12B / 8B

z80 _

RankUserSizeTimeDateStatistics
1ySas610.04462007/12/17 01:34:2635B / 10B / 10B

Vim _

RankUserSizeTimeDateStatistics
1clock430.10382012/01/06 01:45:334B / 23B / 15B
2nn680.97572009/10/27 12:47:155B / 39B / 20B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr420.09482009/12/29 13:34:490B / 16B / 23B
2leonid500.17212012/01/29 15:11:430B / 20B / 28B
3eban590.20232008/01/05 15:05:140B / 23B / 33B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr883.52752009/12/29 22:28:520B / 48B / 38B
2nn953.54732009/12/29 21:00:530B / 54B / 40B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs2310000
2GolfScripttails327187
3gorubymurky-satyr425476
4Vimclock435348
5PerlySas514509
6JI., S.544259
7Ruby2Histocrat554181
8z80ySas613770
9RubyHistocrat623709
10AWKllhuii693333
11xgawkllhuii693333
12Groovymurky-satyr882613
13Arcclock902555
14Pythonleonid922500
15Luatwobit932473
16Haskellnotogawa942446
17Universal Lambdahinoe952421
18PostscriptySas962395
19JavaScriptnn962395
20PHPo-cn972371
21Tclclock1072149
22C7gyou1181949
23Iconclock1251840
24sedemoken(embed)1291782
25BashGus1291782
26REXXclock1291782
27Iomurky-satyr1591446
28Smalltalkmurky-satyr1601437
29Common LISPkozima1671377
30Schemema1681369
31Rpooq1711345
32OCamlksk(embed)1741321
33BASICpoop1851243
34Pascaluru2101095
35Prologmskzzzz235978

Referer

Note that, they may contain spoilers.

return top