Fill Alternating Layers

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

For each line of input, fill alternating layers of parenthesis with asterisks. First layer is filled, second layer is left empty, and so on.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

        (  ( ) )    ( )
 ( ( ( ( ( ( ( ( ( (( )))))))))))
(   ( ) ( ( ) ) ) (  ) ( ) ( ( ))
  ( ) (  (  ) )(   ( ( ( ) ) ) )
(( )) (( )) ((( ))) ( ) (((( ))))
   ( ()  ) ()  (( ( ) ))
(( ( ) ) ) ( ) (( ( )) ) () ( )()
    ()      (((((())))))
(     ((     ((     ))   ))     )
 ((    ) (   ) (  ) ( )       )
      (          (  ( )))( ) (())
(((((((((((((((( ))))))))))))))))
 ( ) ( ) ( ) (( (( ( ) )) )) ( )
(              ( )              )
( (  (   (    (     (      ))))))
  (   (   )    ( (( ) ) )   ( ))

Sample output:

        (**( )*)    (*)
 (*( (*( (*( (*( (*((*)))))))))))
(***( )*( (*) )*) (**) (*) (*( ))
  (*) (**(  )*)(***( (*( )*) )*)
(( )) (( )) (((*))) (*) (((( ))))
   (*()**) ()  (( (*) ))
(( (*) )*) (*) (( (*))*) () (*)()
    ()      (((((())))))
(*****((*****((*****))***))*****)
 ((    )*(   )*(  )*( )*******)
      (**********(  (*)))(*) (())
(((((((((((((((( ))))))))))))))))
 (*) (*) (*) (( (( (*) )) )) (*)
(**************( )**************)
(*(  (***(    (*****(      ))))))
  (***(   )****( (( )*) )***( ))

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1teebee370.01802014/01/07 10:31:200B / 12B / 21B
2Histocrat370.01772014/01/07 11:28:370B / 12B / 21B
3eban370.01102014/01/07 15:33:240B / 12B / 21B
4jpl370.01442014/01/14 21:48:560B / ?B / ?B
5kaki370.03332014/01/20 18:57:300B / 12B / 21B

Perl _

RankUserSizeTimeDateStatistics
1whio320.01432014/01/07 05:56:200B / 11B / 17B
2teebee320.01112014/01/07 10:21:120B / 11B / 17B
3tails320.01092014/01/07 14:51:590B / 11B / 17B
4eban320.01092014/01/07 15:36:280B / 11B / 17B
5brx320.01102014/01/10 06:38:170B / 11B / 17B
6BioFALSE340.01112014/01/07 09:39:070B / 14B / 17B
7jonathan camacho470.01292014/01/07 10:48:280B / 17B / 27B
8tails310.01192018/10/17 12:03:310B / 8B / 20B

Python _

RankUserSizeTimeDateStatistics
1rolf730.04222014/01/08 01:11:210B / 35B / 29B
2Defenestrator790.03272014/01/07 12:51:310B / 37B / 30B
3recursive790.02952014/01/09 09:18:260B / 35B / 31B
4hallvabo850.03692014/01/07 06:54:490B / 41B / 32B
5xnor780.03322015/06/21 18:38:400B / ?B / ?B

Scheme _

RankUserSizeTimeDateStatistics
1kaki740.22592014/01/20 19:11:490B / 39B / 33B

JavaScript _

RankUserSizeTimeDateStatistics
1Shmiddty680.01872014/01/09 07:47:490B / 37B / 28B
2_nderscore680.00992014/01/11 03:40:480B / 37B / 28B
3teebee720.01692014/01/08 07:50:340B / 37B / 31B

Lua _

RankUserSizeTimeDateStatistics
1AndoDaan1150.01182014/08/19 00:38:571B / 67B / 32B

J _

RankUserSizeTimeDateStatistics
1I., S.350.02102014/01/08 18:30:020B / 8B / 27B

C _

RankUserSizeTimeDateStatistics
1pandamonium560.01082014/01/09 23:15:160B / ?B / ?B
2nu560.01062014/01/15 14:17:540B / 33B / 23B
3xsot580.01092014/01/09 22:36:360B / 34B / 24B
4twobit600.01092014/01/15 07:38:120B / 31B / 28B

Haskell _

RankUserSizeTimeDateStatistics
1henkma650.01572014/01/08 00:05:400B / 29B / 33B

AWK _

RankUserSizeTimeDateStatistics
1teebee580.01112014/01/09 07:49:590B / 18B / 39B
2llhuii(teebee)520.01072014/08/19 00:55:310B / 16B / 35B

sed _

RankUserSizeTimeDateStatistics
1tails470.01542016/12/04 01:53:320B / 9B / 33B
2%20590.01382016/12/03 18:28:270B / 10B / 42B
3kanitawa1240.01552014/10/09 17:57:590B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1whio180.05132014/01/08 06:38:010B / 6B / 12B
2tails200.04132014/01/07 15:39:520B / 6B / 14B
3jonathan camacho620.07592014/01/07 12:02:320B / 16B / 43B

gs2 _

RankUserSizeTimeDateStatistics
1tails110.08342018/10/17 11:04:316B / 4B / 1B

Nibbles _

RankUserSizeTimeDateStatistics
1tails90.01862022/02/20 01:07:175B / 3B / 1B

FlogScript _

RankUserSizeTimeDateStatistics
1jonathan camacho490.29452014/01/07 12:23:120B / 10B / 38B

FerNANDo _

RankUserSizeTimeDateStatistics
1tails (akouryy)770.07662021/09/09 11:48:070B / 39B / 0B
2akouryy810.04712021/09/08 20:33:370B / 41B / 0B
3settyan117830.04542021/09/08 18:13:480B / ?B / ?B
4%20970.04962021/09/08 15:58:090B / 49B / 0B
5mug970.04852021/09/08 18:13:280B / 49B / 0B
6Kombu1070.04852021/09/08 17:42:560B / ?B / ?B
7NOCO_10021130.04752021/09/08 19:30:460B / ?B / ?B
8n4o8471150.04592021/09/08 15:48:420B / 54B / 4B
9tiramister1210.04982021/09/08 16:15:240B / ?B / ?B
10_1270.04572021/09/08 17:08:110B / ?B / ?B

Vim _

RankUserSizeTimeDateStatistics
1udioica360.04102016/12/03 16:18:362B / 12B / 18B

Groovy _

RankUserSizeTimeDateStatistics
1teebee530.97432014/01/07 16:51:040B / 28B / 23B

Language Ranking_

RankLangUserSizeScore
1Nibblestails910000
2gs2tails118181
3GolfScriptwhio185000
4Perltails312903
5JI., S.352571
6Vimudioica362500
7Rubyteebee372432
8sedtails471914
9FlogScriptjonathan camacho491836
10AWKllhuii(teebee)521730
11Groovyteebee531698
12Cpandamonium561607
13Haskellhenkma651384
14JavaScriptShmiddty681323
15Pythonrolf731232
16Schemekaki741216
17FerNANDotails (akouryy)771168
18LuaAndoDaan115782

return to the top page