Count diamonds level 2

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

Count the number of diamonds in each ten lines segment.

Options

exec is denied

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

Sample input:_

----------------------------------------
                                        
     *                                  
    ***                                 
   *****                                
    ***                                 
     *                                  
                                        
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                       *                
                      ***               
     *               *****              
    ***               ***               
   *****               *                
    ***                                 
     *                                  
                                        
----------------------------------------
                                        
                                        
    *                    *              
   ***                  ***             
  *****                *****            
   ***                  ***      *      
    *                    *      ***     
                               *****    
                                ***     
                                 *      
----------------------------------------
      *    *      *       *         *   
  *  ***  ***    ***     ***       ***  
 ***  *    *  *   *       *         *   
  *          ***   *              *     
      *       *   ***       *    ***    
     ***           *       ***    *     
 *    *                *    *   *     * 
***    *    *     *   ***      ***   ***
 *    ***  ***   ***   *        *     * 
       *    *     *                     
----------------------------------------
 *   *              *               *   
*** ***  *         ***             ***  
 *   *  ***       *****             *   
         *         ***                  
                    *        *          
                            ***         
  *                          *          
 ***   *    *          *              * 
  *   ***  ***        ***            ***
       *    *          *              * 
----------------------------------------
  *   *    *      *    *   *        *   
 *** ***  ***    ***  *** ***      ***  
  *   *    *  *   *    *   *        *   
             ***     *            *     
      *       *     ***      *   ***    
     ***             *      ***   *     
 *    *          *           *        * 
***         *   ***      *           ***
 *         ***   *      ***           * 
            *            *              
----------------------------------------
                                    *   
                                   ***  
                   *                *   
                  ***                   
                 *****       *          
                  ***       ***         
  *                *         *          
 ***        *                           
  *        ***                          
            *                           
----------------------------------------
                                        
                                        
                                        
                   *                    
                  ***                   
                   *                    
                                        
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                                        
                                        
    *                                   
   ***                   *              
    *                   ***             
                         *       *      
                                ***     
                                 *      
----------------------------------------
                                        
    *                                   
   ***                                  
    *                                   
                  *                     
                 ***         *          
                  *         ***         
       *                     *          
      ***                               
       *                                
----------------------------------------
                  *       *         *   
      *          ***     ***       ***  
     ***      *   *       *         *   
      *      ***    *             *     
              *    ***       *   ***    
       *            *       ***   *     
 *    ***   *                *       *  
***    *   ***   *        *         *** 
 *          *   ***      ***         *  
                 *        *             
----------------------------------------
  *   *    *   *   *   *    *    *    * 
 *** ***  *** *** *** ***  ***  ***  ***
  *   *    *   *   *   *    *    *    * 
              *    *    *               
             ***  ***  ***   *          
       *      *    *    *   ***         
 *    ***            *       *        * 
***  *****       *  ***  *           ***
 *    ***       ***  *  ***           * 
       *         *       *              
----------------------------------------
                        *               
    *                  ***              
   ***                  *               
    *                                   
       *          *          *          
      ***        ***        ***         
       *          *          *          
                                      * 
                                     ***
                                      * 
----------------------------------------
  *   *    *      *    *   *        *   
 *** ***  ***    ***  *** ***      ***  
  *   *    *      *    *   *        *   
                   *              *     
      *       *   ***        *   ***    
     ***     ***   *        ***   *     
 *    *       *              *        * 
***         *    *       *           ***
 *         ***  ***     ***           * 
            *    *       *              
----------------------------------------
                                        
    *                                   
   ***                                  
    *                                   
                  *          *          
                 ***        ***         
                  *          *          
       *                                
      ***                               
       *                                
----------------------------------------
                                    *   
     *                             ***  
    ***                             *   
     *             *                    
                  ***        *          
                   *        ***         
  *      *                   *          
 ***    ***        *                    
  *      *        ***                   
                   *                    
----------------------------------------
                                   *    
                                  ***   
                                   *    
                   *                    
                  ***        *          
                   *        ***         
  *                          *          
 ***        *                           
  *        ***                          
            *                           
----------------------------------------
                                        
                                        
                                        
                   *                    
                  ***                   
                   *                    
                                        
                                        
                                        
                                        
----------------------------------------
 *   *   *                              
*** *** ***                             
 *   *   *                              
                                        
                                        
                                        
                                        
                                        
                                        
                                        
----------------------------------------
  *   *    *      *       *         *   
 *** ***  ***    ***     ***       ***  
  *   *    *  *   *       *         *   
             ***   *              *     
      *       *   ***        *   ***    
     ***           *        ***   *     
 *    *                      *        * 
***         *    *      *            ***
 *         ***  ***    ***            * 
            *    *      *               
----------------------------------------

Sample output:

1
2
3
18
11
17
5
1
3
4
14
19
6
17
4
7
5
1
3
16

Sample input:_

----------------------------------------
  *        *        *        *        * 
 ***      ***      ***      ***   *  ***
  *    *   *        *        *   ***  * 
      ***              *          *     
     *****            ***               
      ***      *       *    *     *     
       *      ***          ***   ***    
  *        *   *    *     *****   *   * 
 ***      ***      ***     ***       ***
  *        *        *       *         * 
----------------------------------------
                                        
    *                              *    
   ***                            ***   
    *                              *    
                  *                     
                 ***                    
                  *                     
       *                                
      ***                               
       *                                
----------------------------------------
  *   *    *      *    *   *        *   
 *** ***  ***    ***  *** ***      ***  
  *   *    *  *   *    *   *        *   
             ***   *              *     
      *       *   ***        *   ***    
     ***           *        ***   *     
      *     *                *        * 
 *         ***   *       *           ***
***         *   ***     ***           * 
 *               *       *              
----------------------------------------
 *         *        *        *        * 
***       ***      ***      ***   *  ***
 *         *        *        *   ***  * 
       *               *          *     
      ***             ***               
       *       *       *          *     
              ***                ***    
  *        *   *    *        *    *   * 
 ***      ***      ***      ***      ***
  *        *        *        *        * 
----------------------------------------
                                    *   
     *                             ***  
    ***                           ***** 
     *             *               ***  
                  ***        *      *   
                   *        ***         
  *                          *          
 ***   *           *                    
  *   ***         ***                   
       *           *                    
----------------------------------------
                  *      *          *   
      *      *   ***    ***        ***  
     ***    ***   *      *          *   
      *      *                    *     
                             *   ***    
       *                    ***   *     
 *    ***   *                *       *  
***    *   ***   *       *          *** 
 *          *   ***     ***          *  
                 *       *              
----------------------------------------
  *        *       *         *        * 
 ***      ***     ***       ***      ***
  *        *       *         *        * 
                                        
                                        
                                        
                                        
  *        *         *       *        * 
 ***      ***       ***     ***      ***
  *        *         *       *        * 
----------------------------------------
  *   *    *      *    *   *        *   
 *** ***  ***    ***  *** ***      ***  
  *   *    *  *   *    *   *        *   
             ***   *              *     
      *       *   ***        *   ***    
     ***           *        ***   *     
 *    *                      *        * 
***         *    *       *           ***
 *         ***  ***     ***           * 
            *    *       *              
----------------------------------------
  *        *        *        *        * 
 ***      ***      ***      ***   *  ***
  *        *        *        *   ***  * 
       *               *          *     
      ***             ***               
       *       *       *          *     
              ***                ***    
  *        *   *    *        *    *   * 
 ***      ***      ***      ***      ***
  *        *        *        *        * 
----------------------------------------
  *   *    *   *   *   *    *       *   
 *** ***  *** *** *** ***  ***     ***  
  *   *    *   *   *   *    *       *   
              *    *    *         *     
             ***  ***  ***   *   ***    
      *       *    *    *   ***   *     
 *   ***             *       *        * 
***   *         *   ***  *           ***
 *             ***   *  ***           * 
                *        *              
----------------------------------------
                                        
    *                                   
   ***                                  
    *                                   
                  *          *          
                 ***        ***         
       *          *          *          
      ***                               
       *                                
                                        
----------------------------------------
      *    *      *       *         *   
  *  ***  ***    ***     ***       ***  
 ***  *    *  *   *       *         *   
  *          ***   *              *     
      *       *   ***        *   ***    
     ***    *      *        ***   *     
 *    *    ***         *     *  *     * 
***    *    *    *    ***      ***   ***
 *    ***       ***    *        *     * 
       *         *                      
----------------------------------------
                                    *   
     *                             ***  
    ***                             *   
     *          *                       
               ***           *          
                *           ***         
  *                          *          
 ***   *           *                    
  *   ***         ***                   
       *           *                    
----------------------------------------
                  *       *         *   
      *          ***     ***       ***  
     ***      *   *       *         *   
      *      ***   *              *     
              *   ***        *   ***    
       *           *        ***   *     
 *    ***   *                *       *  
***    *   ***    *      *          *** 
 *          *    ***    ***          *  
                  *      *              
----------------------------------------
                        *               
    *                  ***              
   ***                  *               
    *                                   
                 *            *         
                ***          ***        
                 *            *         
       *                              * 
      ***                            ***
       *                              * 
----------------------------------------
                  *       *         *   
      *          ***     ***       ***  
     ***      *   *       *         *   
      *      ***   *              *     
              *   ***        *   ***    
       *           *        ***   *     
 *    ***   *                *       *  
***    *   ***   *     *            *** 
 *          *   ***   ***            *  
                 *     *                
----------------------------------------
                                    *   
     *      *                      ***  
    ***    ***                      *   
     *      *                           
                   *    *    *          
                  ***  ***  ***         
  *                *    *    *        * 
 ***    *                            ***
  *    ***                            * 
        *                               
----------------------------------------
  *   *    *   *   *   *   *        *   
 *** ***  *** *** *** *** ***      ***  
  *   *    *   *   *   *   *        *   
                                  *     
      *            *         *   ***    
     ***          ***       ***   *     
 *    *            *         *        * 
***         *    *       *           ***
 *         ***  ***     ***           * 
            *    *       *              
----------------------------------------
                                        
                                        
                       *                
                      ***               
                       *                
                                        
                       *                
                      ***               
                       *                
                                        
----------------------------------------
      *    *      *       *         *   
  *  ***  ***    ***     ***       ***  
 ***  *    *  *   *       *         *   
  *          ***    *             *     
      *       *    ***       *   ***    
     ***    *       *       ***   *     
 *    *    ***         *     *  *     * 
***    *  *****  *    ***      ***   ***
 *    ***  ***  ***    *        *     * 
       *    *    *                      
----------------------------------------

Sample output:

15
4
17
15
7
13
10
17
15
19
4
18
7
14
6
14
9
17
2
18

Sample input:_

----------------------------------------
                                        
                                        
    *                                   
   ***                                  
    *                    *              
                        ***             
                         *              
                                 *      
                                ***     
                                 *      
----------------------------------------
      *           *       *         *   
     ***         ***     ***       ***  
    *****     *   *       *         *   
     ***     ***   *              *     
      *       *   ***        *   ***    
       *           *        ***   *     
 *    ***   *                *       *  
***    *   ***   *       *          *** 
 *          *   ***     ***          *  
                 *       *              
----------------------------------------
   *       *        *        *        * 
  ***     ***      ***      ***   *  ***
   *       *        *        *   ***  * 
                       *          *     
       *              ***               
      ***      *       *          *     
       *      ***                ***    
  *        *   *    *        *    *   * 
 ***      ***      ***      ***      ***
  *        *        *        *        * 
----------------------------------------
                                    *   
     *     *                       ***  
    ***   ***                       *   
     *     *                            
                   *         *          
                  ***       ***         
  *                *    *    *        * 
 ***    *              ***           ***
  *    ***              *             * 
        *                               
----------------------------------------
                       *                
                      ***               
                     *****              
                      ***               
     *                 *                
    ***                                 
     *                                  
                                        
                                        
                                        
----------------------------------------
                        *               
    *                  ***              
   ***                  *               
    *                                   
                             *          
                  *         ***         
                 ***         *          
       *          *                   * 
      ***                            ***
       *                              * 
----------------------------------------
                                    *   
                   *               ***  
                  ***               *   
                   *                    
                             *          
                            ***         
  *                          *          
 ***        *                           
  *        ***                          
            *                           
----------------------------------------
                                        
                         *              
                        ***             
                         *              
    *                                   
   ***                                  
    *                                   
                                 *      
                                ***     
                                 *      
----------------------------------------
                                    *   
                                   ***  
                                    *   
                   *                    
                  ***                   
                   *                    
  *                          *          
 ***        *               ***         
  *        ***               *          
            *                           
----------------------------------------
            *                           
     *     ***                       *  
    ***     *                       *** 
     *            *                  *  
                 ***                    
        *         *          *          
  *    ***                  ***         
 ***  *****        *         *          
  *    ***        ***                   
        *          *                    
----------------------------------------
                                    *   
     *      *                      ***  
    ***    ***                      *   
     *      *                           
                             *          
                   *        ***         
  *               ***   *    *        * 
 ***    *          *   ***           ***
  *    ***              *             * 
        *                               
----------------------------------------
                                        
     *                                  
    ***                                 
     *             *                    
                  ***        *          
                   *        ***         
  *                          *          
 ***   *           *               *    
  *   ***         ***             ***   
       *           *               *    
----------------------------------------
                                    *   
     *      *                      ***  
    ***    ***                      *   
     *      *                           
                   *    *    *          
                  ***  ***  ***         
  *                *    *    *        * 
 ***    *                            ***
  *    ***                            * 
        *                               
----------------------------------------
                                        
                                        
                                        
                                        
    *                    *       *      
   ***                  ***     ***     
    *                    *       *      
                                        
                                        
                                        
----------------------------------------
                                        
                                *       
                               ***      
                                *       
     *                                  
    ***                                 
     *                                  
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                         *              
                        ***             
    *                  *****            
   ***                  ***             
    *                    *              
                                 *      
                                ***     
                                 *      
----------------------------------------
            *                           
     *     ***                       *  
    ***     *                       *** 
     *            *                  *  
                 ***                    
                  *          *          
  *          *              ***         
 ***   *    ***              *          
  *   ***    *                          
       *                                
----------------------------------------
                                        
    *                                   
   ***               *                  
    *               ***                 
                  *  *                  
                 ***                    
                  *                     
       *                                
      ***                               
       *                                
----------------------------------------
                        *               
    *                  ***              
   ***                  *               
    *                                   
               *             *          
              ***           ***         
               *             *          
       *                              * 
      ***                            ***
       *                              * 
----------------------------------------
                                        
                                        
                        *               
                       ***              
     *                  *               
    ***                                 
     *                                  
                                        
                                        
                                        
----------------------------------------

Sample output:

3
14
15
9
2
6
5
3
5
8
9
7
9
3
2
3
8
4
6
2

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1flag(~ksk)310.07862009/10/17 13:46:010B / 13B / 13B
2hide24320.06942009/10/16 10:38:390B / 14B / 13B
3leonid360.10492009/10/07 00:27:450B / 21B / 12B
4yvl360.11002009/10/07 01:49:110B / 21B / 12B
5murky-satyr380.12762009/10/06 04:23:370B / 20B / 12B

Perl _

RankUserSizeTimeDateStatistics
1tybalt89320.05862009/10/05 00:09:200B / ?B / ?B
2c|mell320.03012009/10/06 19:13:170B / 11B / 17B
3yibe320.05622009/10/17 15:04:190B / 11B / 17B
4Mithran350.16562009/10/07 12:51:100B / 19B / 11B
5dcutter350.03862009/10/11 06:13:360B / 12B / 20B
6ySas470.13602009/10/04 10:34:460B / 20B / 23B

Python _

RankUserSizeTimeDateStatistics
1kt3k520.48142009/10/04 01:10:210B / 31B / 17B
2hallvabo520.11952009/10/04 02:12:420B / 31B / 17B
3Mark Byers520.11392009/10/04 23:46:300B / 30B / 19B
4recursive520.10972009/10/06 03:50:510B / 30B / 19B
5primo520.16032009/10/07 03:07:450B / 31B / 17B
6leonid520.14072009/10/08 00:03:000B / 31B / 17B

PHP _

RankUserSizeTimeDateStatistics
1pooq640.14882009/10/13 12:06:170B / 35B / 25B
2Chiether970.15882009/10/13 10:39:050B / 58B / 36B
3o-cn600.02382009/11/27 03:49:090B / 34B / 23B

Scheme _

RankUserSizeTimeDateStatistics
1amanatto880.62802009/10/16 11:24:340B / ?B / ?B
2Pla1260.31032009/10/10 17:26:430B / 79B / 42B

Common LISP _

RankUserSizeTimeDateStatistics
1youz690.41922009/10/07 23:45:210B / 41B / 25B
2c|mell710.43162009/10/06 19:00:510B / 31B / 34B
3kozima840.56052009/10/07 23:31:200B / 51B / 28B

Arc _

RankUserSizeTimeDateStatistics
1youz5111.43992009/10/07 23:17:270B / 29B / 20B
2pooq5111.16962009/10/12 23:57:270B / 31B / 18B
3murky-satyr5811.17922009/10/06 04:30:510B / 33B / 24B

Io _

RankUserSizeTimeDateStatistics
1pooq900.26062012/11/20 17:32:360B / 65B / 19B

JavaScript _

RankUserSizeTimeDateStatistics
1nn640.12832009/10/06 00:02:170B / 30B / 32B

Lua _

RankUserSizeTimeDateStatistics
1pooq600.02902009/10/13 10:28:100B / 34B / 21B
2clock590.03352012/11/20 19:58:350B / 33B / 21B

Tcl _

RankUserSizeTimeDateStatistics
1murky-satyr820.04112009/11/22 23:59:490B / 47B / 19B
2pooq850.04742009/11/21 14:21:170B / 48B / 21B

Xtal _

RankUserSizeTimeDateStatistics
1pooq660.16522009/10/11 13:03:050B / 34B / 31B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*670.10422009/10/16 13:55:360B / 41B / 24B
2pooq1050.12182009/10/13 10:29:000B / 63B / 32B

J _

RankUserSizeTimeDateStatistics
1pooq330.15592009/10/10 22:55:000B / 12B / 18B

C _

RankUserSizeTimeDateStatistics
1nu710.09512009/10/11 06:27:090B / 38B / 33B
251b720.04662009/10/17 14:58:330B / 35B / 37B
3chocobi810.07132009/10/04 01:03:500B / 40B / 41B
4xsd820.05392009/10/03 23:36:010B / 43B / 39B
5nu(51b)680.04792009/10/18 08:49:190B / 35B / 33B

D _

RankUserSizeTimeDateStatistics
151b930.02572009/10/17 15:02:300B / 55B / 35B

OCaml _

RankUserSizeTimeDateStatistics
1ksk920.27202009/10/08 00:16:480B / 51B / 38B
2xsd1070.16102009/10/03 23:37:560B / 53B / 48B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa720.12332009/10/15 21:38:460B / ?B / ?B
2Lost_dog790.08972009/10/16 23:54:290B / 47B / 32B
3abstract890.07772009/10/05 02:27:010B / 53B / 33B

Pascal _

RankUserSizeTimeDateStatistics
1uru1570.04872009/10/12 23:51:110B / 104B / 40B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1030.05382012/11/19 20:54:300B / 55B / 44B

AWK _

RankUserSizeTimeDateStatistics
1nn240.02852009/10/04 06:07:540B / 8B / 14B

jq _

RankUserSizeTimeDateStatistics
1teebee(eban)350.03612014/12/10 05:40:350B / 8B / 24B
2eban420.03752014/12/08 16:13:090B / 14B / 25B

Bash _

RankUserSizeTimeDateStatistics
1eban420.37732009/10/18 00:27:200B / 15B / 21B

Postscript _

RankUserSizeTimeDateStatistics
1Mark Byers531.26262009/10/08 04:40:5118B / 23B / 12B
2yshl(bin)551.11902009/10/17 14:39:1828B / 13B / 12B
3yshl921.25672009/10/04 02:48:480B / 53B / 30B

R _

RankUserSizeTimeDateStatistics
1pooq1143.48812009/10/13 15:08:090B / 60B / 51B
2pooq1130.52462012/11/04 09:58:520B / 61B / 49B

GolfScript _

RankUserSizeTimeDateStatistics
1kt3k180.45612009/10/04 01:22:260B / 5B / 11B
2Mark Byers180.42392009/10/05 02:15:180B / 5B / 11B
3leonid180.68032009/10/07 23:56:470B / 4B / 12B

gs2 _

RankUserSizeTimeDateStatistics
1whio140.27212017/03/09 04:07:034B / 2B / 6B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu210.21962010/08/15 16:22:350B / ?B / ?B

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik250.05332016/11/28 20:51:090B / 9B / 14B

z80 _

RankUserSizeTimeDateStatistics
1kodera350.26462009/10/15 12:48:1122B / 5B / 7B

Vim _

RankUserSizeTimeDateStatistics
1nn531.11772009/10/14 23:50:092B / 28B / 18B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr280.19852009/10/06 21:24:470B / 10B / 15B
2leonid280.26622009/10/08 09:19:020B / 10B / 15B

Groovy _

RankUserSizeTimeDateStatistics
1nn609.99722009/10/04 18:30:170B / 33B / 23B
2murky-satyr573.54042009/11/28 04:52:220B / 26B / 27B

Language Ranking_

RankLangUserSizeScore
1gs2whio1410000
2GolfScriptkt3k187777
3FlogScriptmilieu216666
4AWKnn245833
5BurlesqueHendrik255600
6gorubymurky-satyr285000
7Rubyflag(~ksk)314516
8Perltybalt89324375
9Jpooq334242
10z80kodera354000
11jqteebee(eban)354000
12Basheban423333
13Arcyouz512745
14Pythonkt3k522692
15PostscriptMark Byers532641
16Vimnn532641
17Groovymurky-satyr572456
18Luaclock592372
19PHPo-cn602333
20JavaScriptnn642187
21Xtalpooq662121
22BASIC*yuko*672089
23Cnu(51b)682058
24Common LISPyouz692028
25Haskellnotogawa721944
26Tclmurky-satyr821707
27Schemeamanatto881590
28Iopooq901555
29OCamlksk921521
30D51b931505
31Fortran*yuko*1031359
32Rpooq1131238
33Pascaluru157891

return to the top page