Domande taggate «string»

Una competizione per risolvere un problema particolare attraverso l'uso e la manipolazione delle stringhe.

17
Linea alfanumerica e conteggio delle curve
Data una stringa di input, scrivere un programma che emetta il numero totale di linee e curve che ha. La sfida Prendi input da STDINo qualsiasi altro metodo di input. Output verso STDOUTo qualsiasi altro metodo di output, il numero totale di linee e curve contenute nella stringa, in quell'ordine …

28
Transizione da stringa a bit
Compito Data una stringa di input di uno o più caratteri ASCII i cui punti di codice sono compresi tra 0 e 128 (esclusivo), procedere come segue: Converti ogni carattere nel suo codice ASCII a 7 bit (se il codice ASCII è inferiore a 7 bit, inserisci zero bit iniziali) …

6
Genera scorciatoie da tastiera per un menu
Scorciatoie del menu Tradizionalmente, i menu utente sono accessibili tramite scorciatoie da tastiera, come Alt + (a letter), o anche semplicemente colpire la lettera quando tutte le caselle di testo sono sfocate ( stile gmail ). Il tuo compito Considerate le voci di menu come input, il tuo compito è …
10 code-golf  string 

7
Code-Golf: sequenza Farey (I)
Sfida In questa attività ti verrà assegnato un numero intero N (inferiore a 10 ^ 5), in uscita la sequenza Farey dell'ordine N. L'ingresso N è dato su una sola riga, gli ingressi sono terminati da EOF. Ingresso 4 3 1 2 Produzione F4 = {0/1, 1/4, 1/3, 1/2, 2/3, …
10 code-golf  math  code-golf  math  code-golf  number  number-theory  code-golf  math  arithmetic  repeated-transformation  code-golf  geometry  popularity-contest  code-golf  code-golf  tips  haskell  math  fastest-algorithm  code-golf  combinatorics  code-golf  math  polynomials  rational-numbers  code-golf  code-golf  popularity-contest  javascript  code-golf  kolmogorov-complexity  code-golf  code-golf  math  combinatorics  permutations  code-challenge  restricted-source  random  array-manipulation  code-challenge  generation  code-golf  code-golf  ascii-art  arithmetic  division  code-challenge  number  code-golf  math  number  binary  code-golf  ascii-art  code-golf  interpreter  stack  code-golf  internet  networking  code-golf  math  code-golf  ascii-art  code-golf  math  sequence  code-golf  hello-world  restricted-source  code-golf  ascii-art  code-golf  geometry  code-golf  kolmogorov-complexity  pi  code-golf  math  combinatorics  permutations  code-golf  math  code-challenge  ascii-art  code-golf  string  code-golf  quine  code-golf  math  floating-point  golfscript  code-golf  string  code-golf  sliding-puzzle  code-challenge  arithmetic  code-golf  math  code-golf  geometry  optimized-output 

3
Ordine del dizionario nordcoreano
L'obiettivo Data una stringa di sillabe Hangul, ordina i caratteri nell'ordine del dizionario nordcoreano. Introduzione alle sillabe di Hangul Hangul (한글) è il sistema di scrittura coreano inventato da Sejong il Grande. Le sillabe Hangul sono allocate nel punto Unicode U + AC00 - U + D7A3. Una sillaba Hangul …

4
È valido UTF-8 modificato?
UTF-8 è un modo relativamente semplice per codificare i punti di codice Unicode in un formato a larghezza variabile in modo tale da non confondere facilmente il codice che non è a conoscenza di Unicode. Panoramica UTF-8 I byte nell'intervallo 1-0x7F, inclusi, sono normalmente validi I byte con il modello …

2
Suggerimenti per giocare a golf in The Powder Toy
Divertiti con questo, The Powder Toy è una sfida interessante per il golf, in particolare con la logica dei filtri. La cosa che rende TPT una sfida sono i molti molti molti molti modi per affrontare un problema: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt …
9 code-golf  tips  the-powder-toy  code-golf  number  array-manipulation  integer  code-golf  string  decision-problem  boggle  code-golf  array-manipulation  average  code-golf  math  code-golf  decision-problem  restricted-source  code-golf  code-golf  math  primes  code-golf  random  code-golf  tips  perl  code-golf  string  parsing  code-golf  math  number  decision-problem  code-golf  math  number  code-golf  string  alphabet  code-golf  math  geometry  code-golf  interpreter  brainfuck  code-golf  code-golf  decision-problem  boggle  code-golf  math  number  sequence  code-golf  math  code-golf  ascii-art  code-challenge  restricted-source  quine  code-golf  math  decision-problem  number-theory  primes  code-golf  ascii-art  code-golf  integer  graph-theory  chess  code-golf  math  interpreter  code-golf  code-golf  code-golf  ascii-art  code-golf  arithmetic  number-theory  code-golf  string  kolmogorov-complexity  code-golf  string  decision-problem  code-golf  primes  factoring  encode  code-golf  decision-problem  code-golf  geometry  grid  code-golf  quine  code-golf  matrix  code-golf  matrix  code-golf  code-golf  number  array-manipulation  code-golf  array-manipulation  sorting  code-golf  matrix  code-golf  brain-flak 

3
Simulazione di auto che si schiantano
introduzione Ho alcune macchine ASCII che hanno velocità e direzione. La loro velocità è rappresentata dal loro numero. Se un'auto è <>allora si è fermata. Per esempio: <> 1> 2> 3> Dopo un secondo, capisco <> 1> 2> 3> Dopo le due, capisco <> 1> 2> 3> Se due auto …

5
Piega maiuscola tedesca
Data una stringa tedesca e un'indicazione di un caso (inferiore / superiore / titolo), piega la stringa in quel caso. specificazioni L'input consisterà solo di a- zpiù äöüß-,.;:!?'"in maiuscolo e / o minuscolo. Il caso target può essere preso come qualsiasi tre valori univoci (specificare quali sono) di tipo coerente; …

30
Mostra alcune parole riservate
Per un linguaggio informatico, una parola riservata è una parola che non può essere utilizzata come identificatore, ad esempio il nome di una variabile, funzione o etichetta. Per altri linguaggi informatici, le parole chiave possono essere considerate come l'insieme delle istruzioni linguistiche. Sfida Usando la lingua che preferisci, scrivi un …

7
Golf gli pseudoprimi!
Introduzione / Contesto In una recente discussione nella chat crittografica sono stato sfidato a discutere / aiutare con il test di primalità di Fermat e i numeri di Carmichael. Questo test si basa sulla premessa che a^(p-1) mod p==1sarà sempre valida per i numeri primi p, ma non sempre per …
9 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 

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 

4
Badugi, chi vince?
Ispirato da questa sfida e correlato a questa . sfondo Badugi [bæduːɡiː] è una variante di draw-poker low-ball. L' evento $ 1K di Pokerstars World Cup Of Online Poker inizia entro 3 ore e dovrò sapere quanto sono buone le mie mani! Il gioco utilizza un mazzo standard di 52 …

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 

7
Catena di montaggio Code-Golf
Nota: questa sfida non ha nulla a che fare con l'effettivo linguaggio assembly. Come capo di Code-Golf Factory Inc. , devi creare una catena di montaggio per generare un pezzo di codice specifico. Oggi il caposquadra ti ha chiesto di produrre quines. Specifica: In questa sfida, l'obiettivo è scrivere una …

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.