cp/m Posted July 8, 2010 Report Posted July 8, 2010 Cine face primul cate un program care sa afiseze "Hello RST" in 15 limbaje de programare castiga challenge-ul.Premiul: O shaworma si o fanta gratis.Programele se trimit intr-o arhiva prim PM. E de preferat ca in sursa sau numele sursei/etc sa indice limbajul de programare folosit. Quote
sosetutza Posted July 8, 2010 Report Posted July 8, 2010 Si cum vrei sa imi dai shaorma si fanta? Curier rapid? Quote
Arduino Posted July 8, 2010 Report Posted July 8, 2010 List of "Hello World!" codes - HelloWiki Quote
loki Posted July 8, 2010 Report Posted July 8, 2010 paypal? mancam o shaorma si un fanta, scanam bonul de casa si trimitem lui CP/M. Quote
sevex Posted July 8, 2010 Report Posted July 8, 2010 cp/m: "O shaworma si o fanta gratis." - adica putem sa-i dam arhiva goala ca ne da gratis Quote
prodil89 Posted July 8, 2010 Report Posted July 8, 2010 @CP/M prea simplu bah asta gasesti foarte simplu pe google , trebuia ceva.....nuj ceva in legatura cu matematica cred ca nu primeai 15 src-uri nici intr-o saptamana..Si ramaneai si cu shaorma Quote
Nytro Posted July 8, 2010 Report Posted July 8, 2010 Mai bine un "Hello world" intr-un singur limbaj de programare, dar intr-un mod original Quote
alexalghisi Posted July 8, 2010 Report Posted July 8, 2010 la ce te referi prin "mod original " ? Quote
SlicK Posted July 8, 2010 Report Posted July 8, 2010 Gen cel mai mic executabil care sa scrie "Hello RST!".PS: 130 bytes cu shellcode Quote
Arduino Posted July 8, 2010 Report Posted July 8, 2010 @Nytro Un mod original ar fi sa apelezi shell-ul ruland comanda echo "Hello World!". Cam fiecare limbaj poate rula comenzi shell.@Slick Eu pot face de 50 bytes, dar nu e executabil valid (e un .sh mai exact). Quote
Nytro Posted July 9, 2010 Report Posted July 9, 2010 Recursivitate.#include <stdio.h>const char* RST = "Hello RST";void scrie(int i){ if(i == -1) return; else { scrie(i - 1); printf("%c", RST[i]); }}int main(){ scrie(8); // 8 = lungimea sirului return 0;} Quote
SlicK Posted July 9, 2010 Report Posted July 9, 2010 #include <stdio.h>#define A +#define AA -#define BB 1#define AAA int#define AAAA main#define AAAAA (#define AAAAAA )#define AAAAAAA {#define AAAAAAAA putchar#define AAAAAAAAA ,#define AAAAAAAAAA ;#define AAAAAAAAAAA }#define AAAAAAAAAAAA "#define AAAAAAAAAAAAA *#define AAAAAAAAAAAAAA /#define H AAA AAAA AAAAA#define B(AAAAAAAAAAAAAAA) AAAAAAAA AAAAA AAAAAAAAAAAAAAA AAAAAA AAAAAAAAAA#define BBB AAAAA BB A BB A BB A BB A BB A BB A BB A BB A BB A BB AAAAAA#define e AAAAAA AAAAAAA B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA) B(BBBB)#define l B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB)#define T B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB A BB) AAAAAAAAAAA#define o B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB A BB A BB A BB)#define R B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB A BB AAAAAA)#define BBBB AAAAA AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A AAAAA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB AAAAAA AA BB AAAAAA AAAAAA#define S B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB) B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB)H e l l o R S T 1 Quote
ZeroCold Posted July 9, 2010 Report Posted July 9, 2010 #include <iostream.h>int main(){cout<<"H\n"<<"E\n"<<"L\n"<<"L\n"<<"O\n"<<"\n";cout<<"R\n"<<"S\n"<<"T\n"<<"\n";}:D:D Quote
Arduino Posted July 9, 2010 Report Posted July 9, 2010 #include <stdio.h>#include <stdlib.h>int main (){ int i; i=system ("echo Hello RST"); printf ("%d\n", i); return 0;} Quote
Moderators Dragos Posted July 10, 2010 Moderators Report Posted July 10, 2010 JavaScript<html><body><script type="text/javascript">document.write(String.fromCharCode(72,101,108,108,111,32,82,83,84));</script></body></html>PHP<?php$string = "01010011 01000111 01010110 01110011 01100010 01000111 00111000 01100111 01010101 01101100 01001110 01010101";$syn = explode (" ", $string);$st = "";for ($i=0; $i< count ($syn); $i++){$st = $st . chr(base_convert($syn[$i],2,10));}$ss = base64_decode ($st);echo $ss;?> Quote
Guest .TinKode. Posted July 10, 2010 Report Posted July 10, 2010 HTMLHello RST!i'm 1338 HTML nu e limbaj de programare. True, esti 1338. Quote
Guest .TinKode. Posted July 10, 2010 Report Posted July 10, 2010 u esti 133noob. nici nu am vb serios.Evident ca nu ai vb serios. Nimeni nu o face! Quote
Flubber Posted July 10, 2010 Report Posted July 10, 2010 # Hello RSTa = u"\u0048\u0065\u006c\u006c\u006f\u0020\u0052\u0053\u0054"b = list(a)for i in b: print i? Quote
phantomas90 Posted July 10, 2010 Report Posted July 10, 2010 (edited) #Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_outfile=hello RST.exe#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>GUICreate("Hello World",600,600,100,100,-1);************************************GUISetState(@SW_SHOW)GUISetBkColor(0x000000)GUICtrlCreateCheckbox ( "text",20,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",20,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",20,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",20,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",20,100,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",20,120,20,20,-1 );*****************************************************GUICtrlCreateCheckbox ( "text",40,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",60,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",80,60,20,20,-1 );************************************************GUICtrlCreateCheckbox ( "text",100,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,100,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,120,20,20,-1 );******************************************GUICtrlCreateCheckbox ( "text",140,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,100,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,120,20,20,-1 );************************************************GUICtrlCreateCheckbox ( "text",160,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",180,60,20,20,-1 );*************************************************GUICtrlCreateCheckbox ( "text",160,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",180,20,20,20,-1 );************************************************GUICtrlCreateCheckbox ( "text",160,120,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,120,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",180,120,20,20,-1 );***************************************************GUICtrlCreateCheckbox ( "text",240,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",240,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",240,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",240,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",240,100,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",240,120,20,20,-1 );*************************************************GUICtrlCreateCheckbox ( "text",320,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,100,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,120,20,20,-1 );**************************************************GUICtrlCreateCheckbox ( "text",260,120,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",280,120,20,20,-1 )Sleep(100);***********************************************GUICtrlCreateCheckbox ( "text",340,120,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",360,120,20,20,-1 )Sleep(100);**********************************************GUICtrlCreateCheckbox ( "text",400,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",400,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",400,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",400,100,20,20,-1 )Sleep(100);*************************************************GUICtrlCreateCheckbox ( "text",420,120,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",440,120,20,20,-1 )Sleep(100);********************************************GUICtrlCreateCheckbox ( "text",420,20,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",440,20,20,20,-1 )Sleep(100);*************************************************GUICtrlCreateCheckbox ( "text",460,40,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",460,60,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",460,80,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",460,100,20,20,-1 );************************************************;************************************************GUICtrlCreateCheckbox ( "text",40,220,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,240,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,260,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,280,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,300,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,340,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,360,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",40,380,20,20,-1 );*****************************************************GUICtrlCreateCheckbox ( "text",60,220,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",80,220,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,220,20,20,-1 )Sleep(100);************************************************GUICtrlCreateCheckbox ( "text",60,280,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",80,280,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,280,20,20,-1 )Sleep(100);***********************************************GUICtrlCreateCheckbox ( "text",120,220,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",120,240,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",120,260,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",120,280,20,20,-1 )Sleep(100);*************************************************GUICtrlCreateCheckbox ( "text",60,300,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",80,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",100,340,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",120,360,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",140,380,20,20,-1 )Sleep(100);*************************************************GUICtrlCreateCheckbox ( "text",160,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",160,340,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",160,360,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,380,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,400,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,420,20,20,-1 );************************************************GUICtrlCreateCheckbox ( "text",180,360,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,360,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,360,20,20,-1 );*************************************************GUICtrlCreateCheckbox ( "text",180,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",160,320,20,20,-1 );************************************************GUICtrlCreateCheckbox ( "text",180,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,320,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,320,20,20,-1 );***************************************************GUICtrlCreateCheckbox ( "text",180,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",220,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",160,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",200,420,20,20,-1 );*****************************************************GUICtrlCreateCheckbox ( "text",320,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,440,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,460,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,480,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,520,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,540,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,500,20,20,-1 )Sleep(100);*************************************************GUICtrlCreateCheckbox ( "text",380,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",320,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",360,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",300,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",340,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",280,420,20,20,-1 )Sleep(100)GUICtrlCreateCheckbox ( "text",260,420,20,20,-1 )Sleep(1000)Compilat cu Autoit v3. Pentru cei care nu au Autoit executabilul se gaseste aici hello RST.exe - 304.4 KbSi acum cine gaseste partea de cod care scrie al doilea "L"? Edited July 10, 2010 by phantomas90 Quote
Moderators Dragos Posted July 10, 2010 Moderators Report Posted July 10, 2010 (edited) @phantomas : Incepe de pe la 80 al doilea L. Edited July 10, 2010 by Dragos Quote
phantomas90 Posted July 10, 2010 Report Posted July 10, 2010 @phantomas : Incepe de pe la 80 al doilea L.pe aproape.GUICtrlCreateCheckbox ( "text",320,20,20,20,-1 )Sleep(100)de aici in jos incepe scrierea celui de-al doilea "L" Quote
cmiN Posted July 10, 2010 Report Posted July 10, 2010 Python list compression:import syshexdigest = "48 65 6c 6c 6f 20 6d 61 2d 74 61 21 0a"sys.stdout.write(str().join([chr(int(x, 16)) for x in hexdigest.split()])) Quote