fork(1) download
  1. #define P printf(
  2. #define L;P"|\n")
  3. #define M;p(18," ")
  4. #define D L;B
  5. #define K;P"\\\n")M;P
  6. #define Q;P"|%59c",32)
  7. #define Z(x,y,z)A(3);a=x;A(15)D(3);P y);B(14)L;p(3,U);P"%c%s",z,u);p(14,U)L;
  8. char*l="HHeLiBeBCNOFNeNaMgAlSiPSClArKCaScTiVCrMnFeCoNiCuZnGaGeAsSeBrKrRbSrYZrNbMoTcRuRhPdAgCdInSnSbTeIXeCsBaLaTaWReOsIrPtAuHgTlPbBiPoAtRnFrRaAcDbSgBhHsMtDsRgCnNhFlMcLvTsOgPrNdPmSmEuGdTbDyHoErTmYbLuPaUNpPuAmCmBkCfEsFmMdNoLr",U[]="|_____",*u=U+1;a;p(n,s)int*s;{while(n--)P s);}A(n){for(n+=a;a<n;)P a++>9?"%c%4d ":"%c%3d ",a^72*a^58?a^90*a^104?'|':47:92,a);}B(n){for(;n--;P"%c ",*l>96?*l++:32))P"|%3c",*l++);}N(){A(18)D(18)L;p(18,U)L;}f(){P" %s%102s\n",u,u);A(a=1);P"|%95c",32);A(1)D(1);P"|%95c",32);B(1)L;P"%s%-67s",U,U);p(29,u+4);P"%s|\n",U);A(2)Q;A(6)D(2)Q;B(6)L;p(2,U)Q;p(6,U)L;A(2)Q;A(6)D(2)Q;B(6)L;P"%s%s|",U,U);p(59,u+4);p(6,U)L;N(N());Z(72,"/ Hf ",92)Z(104,"\\ Rf ",47)P"\n")M;p(84,"_");P"\n")M;a=58;A(14)K"/ Ce ");B(13);P"/\n")M;P"\\%s",u);p(13,U)K"");a=90;A(14);P"/\n")M;P"\\ Th ");B(13)K"/%s",u);p(13,U);P"/");}
  9.  
  10. main(){f();}
Success #stdin #stdout 0s 4512KB
stdin
Standard input is empty
stdout
 _____                                                                                                 _____
|  1  |                                                                                               |  2  |
|  H  |                                                                                               |  He |
|_____|_____                                                             _____________________________|_____|
|  3  |  4  |                                                           |  5  |  6  |  7  |  8  |  9  |  10 |
|  Li |  Be |                                                           |  B  |  C  |  N  |  O  |  F  |  Ne |
|_____|_____|                                                           |_____|_____|_____|_____|_____|_____|
|  11 |  12 |                                                           |  13 |  14 |  15 |  16 |  17 |  18 |
|  Na |  Mg |                                                           |  Al |  Si |  P  |  S  |  Cl |  Ar |
|_____|_____|___________________________________________________________|_____|_____|_____|_____|_____|_____|
|  19 |  20 |  21 |  22 |  23 |  24 |  25 |  26 |  27 |  28 |  29 |  30 |  31 |  32 |  33 |  34 |  35 |  36 |
|  K  |  Ca |  Sc |  Ti |  V  |  Cr |  Mn |  Fe |  Co |  Ni |  Cu |  Zn |  Ga |  Ge |  As |  Se |  Br |  Kr |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|  37 |  38 |  39 |  40 |  41 |  42 |  43 |  44 |  45 |  46 |  47 |  48 |  49 |  50 |  51 |  52 |  53 |  54 |
|  Rb |  Sr |  Y  |  Zr |  Nb |  Mo |  Tc |  Ru |  Rh |  Pd |  Ag |  Cd |  In |  Sn |  Sb |  Te |  I  |  Xe |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|  55 |  56 |  57 |  72 |  73 |  74 |  75 |  76 |  77 |  78 |  79 |  80 |  81 |  82 |  83 |  84 |  85 |  86 |
|  Cs |  Ba |  La /  Hf |  Ta |  W  |  Re |  Os |  Ir |  Pt |  Au |  Hg |  Tl |  Pb |  Bi |  Po |  At |  Rn |
|_____|_____|_____\_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|  87 |  88 |  89 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
|  Fr |  Ra |  Ac \  Rf |  Db |  Sg |  Bh |  Hs |  Mt |  Ds |  Rg |  Cn |  Nh |  Fl |  Mc |  Lv |  Ts |  Og |
|_____|_____|_____/_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|

                  ____________________________________________________________________________________
                  |  58 |  59 |  60 |  61 |  62 |  63 |  64 |  65 |  66 |  67 |  68 |  69 |  70 |  71 \
                  /  Ce |  Pr |  Nd |  Pm |  Sm |  Eu |  Gd |  Tb |  Dy |  Ho |  Er |  Tm |  Yb |  Lu /
                  \_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____\
                  |  90 |  91 |  92 |  93 |  94 |  95 |  96 |  97 |  98 |  99 | 100 | 101 | 102 | 103 /
                  \  Th |  Pa |  U  |  Np |  Pu |  Am |  Cm |  Bk |  Cf |  Es |  Fm |  Md |  No |  Lr \
                  /_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____/