Domande taggate «base-conversion»

Conversione di numeri tra sistemi numerici posizionali. I sistemi più comuni sono decimali, binari, esadecimali ecc.

4
Giorni compressi della settimana
Dato un input di un elenco di giorni della settimana, genera la rappresentazione ordinata più breve dell'elenco. Il formato del input è una stringa costituita da uno o più delle stringhe di due caratteri Su(Domenica), Mo(Lunedi), Tu(ecc), We, Th, Fr, e Sa. L'input potrebbe non essere necessariamente indicato in ordine …

11
Tessitura ASCII a 64 bit
Ingresso Due numeri interi: Un numero intero non negativo W nell'intervallo da 0 a 2 ^ 64-1, che specifica la trama. Un numero intero positivo S compreso tra 1 e 255, che specifica la lunghezza del lato. Questi possono essere presi nell'ordine che preferisci. Produzione Una rappresentazione S by S …

16
Trova la cifra rappresentante più lunga
Il tuo compito è quello di prendere un numero positivo come input, n e produrre la lunghezza della rappresentazione della cifra ripetuta più lunga di n in qualsiasi base. Ad esempio 7 può essere rappresentato come uno dei seguenti 111_2 21_3 13_4 12_5 11_6 10_7 7_8 Le cifre di ripetizione …

30
Elementi che scompaiono
Data una stringa Se un elenco di indici X, modificare Srimuovendo l'elemento in ciascun indice di Smentre si utilizza quel risultato come nuovo valore di S. Ad esempio, dato S = 'codegolf'e X = [1, 4, 4, 0, 2], 0 1 2 3 4 5 6 7 | c o …
17 code-golf  string  array-manipulation  code-golf  string  ascii-art  code-golf  number  sequence  pi  code-golf  number  array-manipulation  code-golf  string  ascii-art  code-golf  math  number  game  code-golf  math  sequence  polynomials  recursion  code-golf  math  number  sequence  number-theory  code-golf  permutations  balanced-string  code-golf  string  ascii-art  integer  code-golf  decision-problem  hexagonal-grid  code-golf  ascii-art  kolmogorov-complexity  code-golf  number  code-golf  matrix  binary-matrix  code-golf  math  statistics  code-golf  string  polyglot  code-golf  random  lost  code-golf  date  path-finding  code-golf  string  code-golf  math  number  arithmetic  number-theory  code-golf  tetris  binary-matrix  code-golf  array-manipulation  sorting  code-golf  number  code-golf  array-manipulation  rubiks-cube  cubically  code-golf  grid  optimization  code-golf  math  function  code-golf  string  quine  code-golf  ascii-art  grid  code-golf  decision-problem  grid  simulation  code-golf  math  sequence  code-golf  path-finding  code-golf  ascii-art  grid  simulation  code-golf  number  whitespace  code-golf  sequence  code-golf  sequence  code-golf  sequence  integer  code-golf  math  game  code-golf  internet  stack-exchange-api  code-golf  sequence  code-golf  internet  stack-exchange-api  code-golf  math  factoring  code-challenge  sequence  polyglot  rosetta-stone  code-golf  string  browser  code-golf  date  code-golf  base-conversion  code-challenge  cops-and-robbers  hello-world  code-golf  cops-and-robbers  hello-world 

12
La condivisione segreta di Shamir
Dato n(il numero di giocatori), t(il valore di soglia) e s(il segreto), ngenera i segreti generati dall'algoritmo Shamir's Secret Sharing . L'algoritmo Ai fini di questa sfida, i calcoli verranno eseguiti in GF (251) (il campo di dimensioni finito 251, altrimenti noto come numeri interi mod 251 ). Di solito, …
17 code-golf  number-theory  random  cryptography  polynomials  code-golf  number  code-golf  math  number  sequence  code-golf  quine  code-generation  code-golf  arithmetic  set-theory  code-golf  sequence  code-golf  code-golf  string  math  fastest-code  optimization  code-golf  code-golf  internet  stack-exchange-api  code-golf  array-manipulation  code-golf  string  internet  string  code-challenge  internet  test-battery  code-golf  math  pi  code-golf  arithmetic  primes  code-golf  array-manipulation  code-golf  string  code-golf  string  palindrome  code-golf  sequence  number-theory  fastest-algorithm  code-golf  math  number  base-conversion  code-golf  number-theory  sorting  subsequence  search  code-golf  permutations  code-challenge  popularity-contest  code-generation 

7
Primes in diverse basi
Sfida: Ti viene dato un numero di base 10. Per ogni base dal 10 alla rovescia alla base 2: Prendere il numero di ingresso originale come stringa base 10, e rimuovere eventuali cifre del numero che non sono validi per la base. Interpreta la stringa numerica risultante in quella base. …

3
Trova pattern nelle stringhe
In questa sfida, il tuo compito è individuare sottostringhe con una determinata struttura. Ingresso Il tuo input deve essere due stringhe alfanumeriche non vuote, un modello p e un testo t . L'idea è che ogni personaggio di prappresenta una sottostringa contigua non vuota di tcui si verificano uno accanto …
17 code-golf  string  code-golf  ascii-art  geometry  code-golf  ascii-art  code-golf  sequence  stack  code-challenge  number  sequence  answer-chaining  code-golf  code-challenge  math  combinatorics  binary-matrix  code-golf  number  code-golf  cryptography  bitwise  code-golf  sudoku  code-golf  brainfuck  metagolf  code-golf  probability-theory  number-theory  primes  fewest-operations  factoring  golf-cpu  code-golf  restricted-source  code-golf  graphical-output  sequence  binary  code-golf  tips  c#  code-golf  geometry  code-golf  graphical-output  fractal  code-golf  number  sequence  code-golf  number  array-manipulation  popularity-contest  game  board-game  code-golf  puzzle-solver  grid  code-golf  ascii-art  geometry  grid  tiling  code-golf  ascii-art  whitespace  balanced-string  code-golf  card-games  king-of-the-hill  javascript  code-golf  whitespace  balanced-string  code-golf  code-golf  math  abstract-algebra  code-golf  java  code-golf  interpreter  stack  code-golf  base-conversion  code-golf  tips  code-golf  ascii-art  geometry  brainfuck  metagolf  code-challenge  math  quine  code-generation  code-golf  number  kolmogorov-complexity  arithmetic  expression-building  code-golf  string  code-golf  quine  popularity-contest  code-golf  base-conversion  code-challenge  image-processing  code-golf  conversion  coding-theory 

15
Va via! No-1 è qui!
Stavo giocando con alcuni numeri e ho trovato una sequenza che, ovviamente, è su OEIS. È A005823 : numeri la cui espansione ternaria non contiene 1 . Va: a (2n) = 3 * a (n) +2 a (2n + 1) = 3 * a (n + 1) a (1) = …

18
Diversità digitale
Un numero intero positivo può essere rappresentato in una base intera 1 <= b < inf. Quando convertito in quella base ha un certo numero di cifre distinte. Qualsiasi numero intero positivo nella base 1ha 1una cifra distinta. La maggior parte dei numeri interi positivi nella base 2ha 2cifre distinte, …

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 

11
Somma di sottostringhe binarie
Questa sfida è semplice, dato un numero decimale, converti in binario e calcola la somma delle sottostringhe del numero binario, la cui lunghezza è inferiore al numero originale. Ecco un esempio: Input: 11 Binary: 11 -> 1011 Substrings: 101 = 5 011 = 3 10 = 2 01 = 1 …


18
Palindrome della base più bassa
Dato un numero n, scrivi una funzione che trova la base più piccola in b ≥ 2modo che nsia un palindromo nella base b. Ad esempio, un input di 28dovrebbe restituire la base 3poiché la rappresentazione ternaria di 28 è 1001. Sebbene 93sia un palindromo sia nella base 2 che …

18
Semplificazione dei numeri
Come, non ricordi il numero di telefono a 6 o 7 cifre che è apparso sullo schermo della TV per un secondo ?! Usando la tecnica speciale descritta di seguito, ti trasformerai in una rubrica a piedi! Ovviamente, il numero 402è più facile da ricordare rispetto al numero 110010010e 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.