Domande taggate «decision-problem»

Per le sfide che implicano decidere se l'input soddisfa o meno determinati criteri e fornire alcuni dati, che rappresentano tale decisione.


12
Verifica il puzzle delle regine
Se non sai cos'è una regina negli scacchi, non importa molto; è solo un nome :) Il tuo input sarà un quadrato di larghezza e altezza arbitrarie contenente una certa quantità di regine. La scheda di input avrà questo aspetto (questa scheda ha una larghezza e un'altezza di 8): ...Q.... …


14
Numeri non palindromici
Un numero strettamente non palindromico N è un numero che non è un palindromo in nessuna base (nelle basi da 2 a N-2). Questi numeri sono elencati su OEIS Ad esempio, il numero 19della base 2,3,4,5,6, ... 17 è: 10011, 201, 103, 34, 31, ... 12. Nessuna di queste rappresentazioni …


20
Decomporre un numero!
Il tuo compito è di scomporre un numero usando il formato seguente. Questo è simile alla conversione di base, tranne per il fatto che invece di elencare la digitsnella base, si elenca la values, in modo tale che la lista si sommi all'input. Se la base data è n, quindi …
16 code-golf  number  sequence  number-theory  base-conversion  code-golf  bitwise  hashing  code-golf  string  ascii-art  whitespace  code-golf  math  code-golf  code-golf  image-processing  counting  code-golf  math  arithmetic  checksum  code-golf  code-golf  math  arithmetic  number-theory  code-golf  array-manipulation  random  code-golf  string  code-golf  math  ascii-art  base-conversion  code-golf  graphical-output  geometry  3d  code-golf  math  linear-algebra  matrix  code-golf  math  number  sequence  code-golf  array-manipulation  code-golf  math  matrix  linear-algebra  code-golf  number  sequence  counting  code-golf  string  code-golf  string  restricted-source  quine  sorting  code-golf  string  geometry  code-golf  string  code-golf  networking  code-golf  base-conversion  code-golf  math  matrix  code-golf  arithmetic  linear-algebra  matrix  code-golf  number  arithmetic  grid  code-golf  number  source-layout  code-golf  string  bitwise  checksum  code-golf  array-manipulation  code-golf  string  probability-theory  code-golf  tips  code-golf  sequence  code-golf  string  math  sequence  calculus  code-golf  string  palindrome  bioinformatics  code-golf  math  combinatorics  counting  permutations  code-golf  parsing  logic-gates  code-golf  arithmetic  number-theory  combinatorics  code-golf  math  sequence  polynomials  integer  code-golf  string  ascii-art  chess  code-golf  string  code-golf  number  code-golf  string  ascii-art  parsing  code-golf  code-golf  number  natural-language  conversion  code-golf  arithmetic  code-golf  string  code-golf  ascii-art  decision-problem 

30
Numeri undulant
Un numero undulant è un numero in cui le sue cifre si alternano tra su e giù come il seguente numero: 461902 o 708143, o anche 1010101, ma non 123, perché 2 <3. Scrivere un programma o una funzione che restituisce un valore truthy se un numero è ondulante , …


25
Uguaglianza della frazione mista
Nella scuola elementare, i bambini imparano a conoscere le frazioni appropriate, dove il numeratore è inferiore al denominatore e quindi il valore della frazione è inferiore a uno. Successivamente, vengono insegnate le frazioni in cui il valore della frazione è maggiore di uno e due modi diversi per esprimere queste …

21
È questo un numero di scala?
Sfida: Controlla se il numero dato forma number staircaseo meno Input: Un numero intero (maggiore di 0 e non decimale). NOTA: è possibile accettare input come stringa, matrice di cifre. Produzione : un valore di verità / falsità a seconda che il numero formi una scala o meno Numero scala: …

10
Limita i tuoi numeri con le tue corse
Elenchi autolimitanti Si consideri un elenco non vuoto L contenente numeri interi non negativi. Una corsa in L è un sottoelenco contiguo di elementi uguali, che non può essere allungato. Ad esempio, le serie di [0,0,1,1,3,3,3,2,1,1] sono [0,0], [1,1], [3,3,3], [2 ], [1,1] . L'elenco L è auto-limitante se per …

7
Uguaglianza di oscillazione
Abbiamo oggetti che oscillano tra due punti interi [l, r], alla velocità di un'unità per unità di tempo, a partire da lon t=0. Puoi presumere l < r. Ad esempio, se un oggetto oscilla su [3, 6], allora abbiamo: t=0 -> 3 t=1 -> 4 t=2 -> 5 t=3 -> …
15 code-golf  array-manipulation  decision-problem  code-golf  math  number-theory  palindrome  integer-partitions  code-golf  math  decision-problem  geometry  code-golf  string  random  code-golf  ascii-art  code-golf  kolmogorov-complexity  primes  code-golf  kolmogorov-complexity  code-golf  graphical-output  code-golf  number-theory  primes  integer  factoring  code-golf  sequence  array-manipulation  integer  code-golf  array-manipulation  matrix  code-golf  sequence  binary  code-golf  game  cellular-automata  game-of-life  binary-matrix  code-golf  string  ascii-art  code-golf  random  generation  logic  code-golf  string  code-golf  code-golf  sequence  array-manipulation  random  apl  code-golf  code-golf  sequence  primes  code-golf  math  sequence  integer  code-golf  number  arithmetic  array-manipulation  decision-problem  code-golf  ascii-art  number  code-golf  restricted-source  quine  code-golf  chess  board-game  code-golf  math  sequence  code-golf  number  sequence  kolmogorov-complexity  code-golf  number  sequence  arithmetic  code-golf  math  number  alphabet  code-golf  ascii-art  classification  statistics  apl  code-golf  array-manipulation  matrix  code-golf  string  kolmogorov-complexity  code-golf  sequence  binary  base-conversion  binary-matrix  code-golf  string  classification  code-golf  tips  python  code-golf  combinatorics  binary  subsequence  restricted-time  code-golf  number  number-theory  code-golf  math  number  complex-numbers  code-golf  string  code-golf  string  code-golf  string  random  game  king-of-the-hill  python  code-golf  number  sequence  code-golf  number  sequence  code-golf  code-golf  math  number  array-manipulation  code-golf  array-manipulation  decision-problem  code-golf  string  code-golf  sequence  integer 

30
Crea un programma Parrot
Dato un input, output quell'input seguito da una nuova riga all'infinito. L'input sarà una stringa composta solo da caratteri ASCII stampabili ( 0x20-0x7E) e newline ( 0x0A). Se l'input ha una lunghezza pari a 0, emette continuamente nuove righe. Si tratta di code-golf quindi vince il minor numero di byte …
15 code-golf  string  sequence  combinatorics  fastest-code  number  code-challenge  restricted-source  rosetta-stone  code-golf  arithmetic  decision-problem  integer  factorial  code-golf  arithmetic  decision-problem  integer  bitwise  code-golf  kolmogorov-complexity  code-golf  tips  vim  code-golf  quine  code-generation  code-golf  string  restricted-source  code-golf  string  random  unicode  code-golf  audio  code-golf  ascii-art  code-golf  decision-problem  code-golf  puzzle-solver  code-golf  restricted-source  code-golf  kolmogorov-complexity  permutations  hexagonal-grid  code-golf  string  math  combinatorics  fastest-code  code-golf  restricted-source  code-golf  string  code-golf  arithmetic  code-golf  math  number  code-golf  string  decision-problem  balanced-string  code-golf  binary  code-golf  string  number  code-challenge  restricted-source  code-golf  ascii-art  printable-ascii  interactive  code-golf  string  ascii-art  code-challenge  restricted-source  source-layout  code-golf  arithmetic  tips  functional-programming  golfing-language  code-golf  binary  encryption 

2
Sono superato da Dennis?
Secondo la leggenda , quasi tutti sono superati da Dennis . In caso contrario, lo saranno. Ora sono curioso di sapere se sono uno di quei "quasi tutti". Ti verrà dato un link a una risposta nel formato di /codegolf/[QUESTION ID]/[QUESTION NAME]/#[ANSWER ID]. Trova la lunghezza del codice, che assumeremo …

2
Verifica le mie lasagne
Scenario Cucino spesso lasagne, ma ho anche qualche errore. Dato che ripeto questi errori così spesso, ho pensato che forse avrei potuto fare un programma che controlla se ho fatto tutto bene. Lasagne valide Una lasagna valida è Almeno 5 colonne di larghezza Almeno 4 strati di altezza Escluso il …

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.