You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gnieark 7deb1a660a change extension
ça m'énervait qu'openscad soit à 90% des langages utilisés sur ce dépot
9 years ago
..
gnieark change extension 9 years ago
khajidu Rename sapin/monbeausapin.py to sapin/khajidu/monbeausapin.py 9 years ago
kobajaski Create pasin.py 9 years ago
moebiuseye@549ea68301 Add moebiuseye 9 years ago
moul@82391c6f6a Bump submodules 9 years ago
zigazou Added Haskell versions, including a golfed version 9 years ago
README.md Update README.md 9 years ago

README.md

sapin

rules

Écrire une fonction qui affiche un sapin a l'écran en fonction d'une taille donnée. Un sapin de 0, n'affiche rien.

$> sapin 1
   *
  ***
 *****
*******
   |
$> sapin 5
                   *
                  ***
                 *****
                *******
                 *****
                *******
               *********
              ***********
             *************
              ***********
             *************
            ***************
           *****************
          *******************
         *********************
           *****************
          *******************
         *********************
        ***********************
       *************************
      ***************************
     *****************************
       *************************
      ***************************
     *****************************
    *******************************
   *********************************
  ***********************************
 *************************************
***************************************
                 |||||
                 |||||
                 |||||
                 |||||
                 |||||
$> sapin 10
                                                  *
                                                 ***
                                                *****
                                               *******
                                                *****
                                               *******
                                              *********
                                             ***********
                                            *************
                                             ***********
                                            *************
                                           ***************
                                          *****************
                                         *******************
                                        *********************
                                          *****************
                                         *******************
                                        *********************
                                       ***********************
                                      *************************
                                     ***************************
                                    *****************************
                                      *************************
                                     ***************************
                                    *****************************
                                   *******************************
                                  *********************************
                                 ***********************************
                                *************************************
                               ***************************************
                                  *********************************
                                 ***********************************
                                *************************************
                               ***************************************
                              *****************************************
                             *******************************************
                            *********************************************
                           ***********************************************
                          *************************************************
                             *******************************************
                            *********************************************
                           ***********************************************
                          *************************************************
                         ***************************************************
                        *****************************************************
                       *******************************************************
                      *********************************************************
                     ***********************************************************
                    *************************************************************
                        *****************************************************
                       *******************************************************
                      *********************************************************
                     ***********************************************************
                    *************************************************************
                   ***************************************************************
                  *****************************************************************
                 *******************************************************************
                *********************************************************************
               ***********************************************************************
              *************************************************************************
                  *****************************************************************
                 *******************************************************************
                *********************************************************************
               ***********************************************************************
              *************************************************************************
             ***************************************************************************
            *****************************************************************************
           *******************************************************************************
          *********************************************************************************
         ***********************************************************************************
        *************************************************************************************
       ***************************************************************************************
            *****************************************************************************
           *******************************************************************************
          *********************************************************************************
         ***********************************************************************************
        *************************************************************************************
       ***************************************************************************************
      *****************************************************************************************
     *******************************************************************************************
    *********************************************************************************************
   ***********************************************************************************************
  *************************************************************************************************
 ***************************************************************************************************
*****************************************************************************************************
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
                                             |||||||||||
$>

Author

moul

Winners

Speed

  1. khajidu
  2. kobajaski
  3. gnieark
  4. zigazou
  5. moebiuseye

moul is off-side for the speed challenge