Domande taggate «code-challenge»

Una sfida al codice è una competizione per modi creativi di risolvere un puzzle di programmazione con un criterio obiettivo vincente non coperto da altri tag di punteggio (ad esempio code-golf).

13
Espandi catene di confronto
A differenza di molti linguaggi, Python valuta a<b<cin quanto sarebbe stato fatto nel campo della matematica, in realtà a confronto i tre numeri, al contrario di confrontare il booleano a<ba c. Il modo corretto di scrivere questo in C (e molti altri) sarebbe a<b && b<c. In questa sfida, il …
9 code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

30
Dato un input int n, stampa n * invertito (n)
Dato un numero intero n, stampan * reversed(n) reversed(n)è il numero che ottieni quando hai reversele cifre di n. reverse(512) = 215 reverse(1) = 1 reverse(101) = 101 >>>>>>>> func(5) = 5*5 = 25 func(12) = 12*21 = 252 func(11) = 11*11 = 121 func(659) = 659*956 = 630004 Vince …
9 code-golf  math  arithmetic  code-golf  math  integer  code-golf  arithmetic  integer  code-golf  sequence  base-conversion  palindrome  code-golf  math  primes  integer  code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

2
Le 10.000 parole più comuni
Questa domanda è scritta perché "Thing Explainer" è divertente da leggere e mi ha dato un'idea. Scrivi "cose ​​che fanno fare al computer cose" che legge / prende un insieme di lettere, numeri e cose del genere "#%|?e ritorna True / 1se tutte le parole fanno parte di questo insieme …
9 code-golf  string  parsing  code-golf  array-manipulation  random  permutations  code-golf  string  code-golf  parsing  code-golf  string  quine  code-golf  string  parsing  comment  code-golf  string  counting  natural-language  code-golf  string  decision-problem  code-golf  math  code-challenge  metagolf  test-battery  code-golf  string  code-golf  math  number  arithmetic  source-layout  code-golf  number  primes  decision-problem  code-golf  math  arithmetic  code-golf  date  code-golf  string  cryptography  code-golf  code-golf  chess  board-game  code-golf  geometry  grid  puzzle-solver  set-partitions  code-golf  number  natural-language  code-golf  ascii-art  code-golf  math  code-golf  string  ascii-art  kolmogorov-complexity  code-golf  string  natural-language  code-golf  game  board-game  tic-tac-toe  code-golf  ascii-art  hexagonal-grid  code-golf  string  comment  code-golf  internet  code-golf  sorting  code-golf  kolmogorov-complexity  unicode  code-golf  tips  code-golf  string  natural-language  code-golf  string  kolmogorov-complexity  source-layout  hello-world  code-golf  string  kolmogorov-complexity  counting  natural-language  code-golf  random  quine  code-golf  string  math  bitwise  code-golf  permutations  code-golf  string  code-golf  arithmetic 



2
Trovare programmi nei Primes
Assegniamo i numeri da 0 a 94 ai 95 caratteri ASCII stampabili : !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Lo spazio è 0, !è 1 e così via fino a ~94. Assegneremo anche 95 a tab ( \t) e 96 a newline ( \n). Consideriamo ora la stringa infinita il cui nono carattere è il …

1
Combine quines
sfondo Hai appena imparato cos'è la logica combinatoria . Incuriosito dai vari combinatori, trascorri un po 'di tempo a conoscerli. Alla fine ti imbatti in questa particolare espressione: (S I I (S I I)) Si nota che quando si tenta di ridurlo alla sua forma normale, si riduce a se …

3
Ottimizzazione della memoria limitata
La distanza di modifica (o Levenshtein) tra due stringhe è il numero minimo di inserimenti, eliminazioni e sostituzioni di caratteri singoli necessari per trasformare una stringa nell'altra. Se le due stringhe hanno lunghezza n ciascuna, è noto che ciò può essere fatto in tempo O (n ^ 2) mediante la …

5
Trova il primo più furbo
Intro Considera il processo di prendere un numero intero positivo n in qualche base b e sostituire ogni cifra con la sua rappresentazione nella base della cifra a destra. Se la cifra a destra è uno 0, utilizzare la base b . Se la cifra a destra è un 1, …

5
Porte porte porte, vieni giù al negozio di porte!
La sfida è duplice: Crea un programma che costruisca una porta. ASCII, HTML o altro Rendi funzionale la porta. Apre e chiude O open-grado attraverso input o interazione! Porta non funzionale +5 punti. Solo una porta in grado di aprire +10 punti. Porta interattiva +15 punti. Porta fantasia +20 punti. …

3
Compressione di testo con perdita
sfondo Dei 256 possibili caratteri che un byte può rappresentare, solo alcuni di questi vengono utilizzati nella maggior parte dei casi. Non potremmo in qualche modo approfittarne e rendere più piccoli i nostri file di testo eliminando la necessità delle lettere usate raramente? Molte lettere non aggiungono alcun valore nella …

4
Problema N-Queens [chiuso]
Chiuso. Questa domanda è fuori tema . Al momento non accetta risposte. Vuoi migliorare questa domanda? Aggiorna la domanda in modo che sia in argomento per Code Golf Stack Exchange. Chiuso 5 anni fa . Bloccato . Questa domanda e le sue risposte sono bloccate perché la domanda è fuori …

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.