Preguntas etiquetadas con array-manipulation

Una competencia para resolver un problema particular mediante el uso y la manipulación de matrices.



13
Operaciones con listas
Inspirado por esta pregunta . Dada una lista que contiene números, imprima: La suma y el producto de los números en la lista. El promedio y la mediana Las diferencias entre cada término en la lista (ex [1,2,3] -> [1,1]: 1+1=2, 2+1=3) La lista, ordenada ascendente El mínimo y el …

7
Code-Golf: secuencia de la Farey (I)
Desafío En esta tarea, se le dará un número entero N (menos de 10 ^ 5), generará la secuencia de Farey de orden N. La entrada N se da en una sola línea, las entradas son terminadas por EOF. Entrada 4 3 1 2 Salida F4 = {0/1, 1/4, 1/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 

1
Transposición diádica
Como con la mayoría de los símbolos APL, ⍉tiene diferentes significados cuando se llama con un argumento (transposición) versus dos argumentos (dimensiones de transposición / reordenación diádica). Este desafío se refiere a este último, que actúa de manera similar a numpy.moveaxisPython o permuteMATLAB, pero es más poderoso. order ⍉ Acuando …


24
Undelta multiplicativo
Definamos los "deltas multiplicativos" de los valores [a0,⋯aN,][a0,⋯aN,][\; a_0, \cdots a_N, \;] como: [a1/a0,⋯,ai+1/ai,⋯,aN/aN−1][a1/a0,⋯,ai+1/ai,⋯,aN/aN−1] [\; a_1 / a_0, \cdots, a_{i+1} / a_i, \cdots, a_N / a_{N-1} \;] La operación inversa, a saber, "undelta multiplicativa" , devuelve valores tales que la operación anterior da como resultado los valores dados. Ejemplo Valores …

2
Consejos para jugar golf en The Powder Toy
Diviértete con este, The Powder Toy es un desafío interesante para el golf, especialmente con la lógica de filtrado. Lo que hace que TPT sea un desafío son las muchas, muchas, muchas formas de abordar un problema: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, …
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 




7
Golf los pseudoprimes!
Introducción / antecedentes En una discusión reciente en el chat de cifrado, tuve el desafío de discutir / ayudar con la prueba de primalidad de Fermat y los números de Carmichael. Esta prueba se basa en la premisa que a^(p-1) mod p==1siempre se mantendrá para los primos p, pero no …
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 

30
Dada una entrada int n, imprima n * invertido (n)
Dado un número entero n, imprimirn * reversed(n) reversed(n)es el número que obtienes cuando tienes reverselos dígitos 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 ¡El código …
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 

13
Expandir cadenas de comparación
A diferencia de la mayoría de los lenguajes, Python evalúa a<b<ccomo se haría en matemáticas, comparando en realidad los tres números, en lugar de comparar el booleano a<bcon c. La forma correcta de escribir esto en C (y muchas otras) sería a<b && b<c. En este desafío, su tarea es …
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 

3
Viejo teléfono inalámbrico
Necesito llamar a mis amigos, pero los botones de mi teléfono inalámbrico no funcionan correctamente. Los únicos botones que puedo presionar son [Arriba], [Abajo] y [Llamar]. [Arriba] y [Abajo] se pueden usar para navegar en mis llamadas recientes y [Llamar] se puede usar para llamar al nombre seleccionado. Mi teléfono …

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.