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

FlogScript _

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

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
1gs2tails1110000
2GolfScriptwhio186111
3Perltails313548
4JI., S.353142
5Vimudioica363055
6Rubyteebee372972
7sedtails472340
8FlogScriptjonathan camacho492244
9AWKllhuii(teebee)522115
10Groovyteebee532075
11Cpandamonium561964
12Haskellhenkma651692
13JavaScriptShmiddty681617
14Pythonrolf731506
15Schemekaki741486
16LuaAndoDaan115956

return to the top page