Questions marquées «sequence»

Pour les défis impliquant une sorte de séquence.

7
Code-Golf: séquence de Farey (I)
Défi Dans cette tâche, vous recevrez un entier N (inférieur à 10 ^ 5), sortez la séquence de Farey d'ordre N. L'entrée N est donnée sur une seule ligne, les entrées sont terminées par EOF. Contribution 4 3 1 2 Production F4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1} …
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 

2
Conseils pour jouer au golf dans The Powder Toy
Amusez-vous avec celui-ci, The Powder Toy est un défi intéressant pour le golf, en particulier avec la logique filt. La chose qui fait du TPT un défi est la multitude de façons d'aborder un problème: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall …
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 

13
Développer les chaînes de comparaison
Contrairement à la plupart des langages, Python évalue a<b<ccomme il le ferait en mathématiques, comparant en fait les trois nombres, au lieu de comparer le booléen a<bà c. La bonne façon d'écrire cela en C (et bien d'autres) serait a<b && b<c. Dans ce défi, votre tâche consiste à étendre …
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 

7
Jouez aux pseudoprimes!
Introduction / Contexte Lors d'une récente discussion dans le chat crypto, j'ai été mis au défi de discuter / aider avec le test de primalité de Fermat et les nombres de Carmichael. Ce test est basé sur la prémisse qui a^(p-1) mod p==1sera toujours valable pour les nombres premiers p, …
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
Étant donné une entrée int n, imprimer n * inversé (n)
Étant donné un entier n, imprimezn * reversed(n) reversed(n)est le numéro que vous obtenez lorsque vous reverseles chiffres de 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 …
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 

22
Échangez la séquence
Votre tâche consiste à écrire du code qui génère une séquence OEIS et contient le nom de la séquence dans le code ( A______). Assez simple non? Eh bien, voici le hic, votre code doit également générer une deuxième séquence distincte lorsque le nom de la séquence dans le code …

4
Ordre des ensembles Mia
Le jeu de dés Mia introduit un ordre très non trivial d'ensembles de taille deux: {3,1} < {3,2} < {4,1} < {4,2} < {4,3} < {5,1} < {5,4} < {6,1} < {6,5} < {1,1} < {2,2} < {6,6} < {1,2} En général, l'ordre dans un tuple n'a pas d'importance {x,y}={y,x}, …



7
La séquence de Szekeres
Définition a(1) = 1 a(2) = 2 a(n)est le plus petit nombre k>a(n-1)qui évite toute progression arithmétique à 3 termes dans a(1), a(2), ..., a(n-1), k. En d'autres termes, a(n)est le plus petit nombre k>a(n-1)tel qu'il n'existe pas x, yoù 0<x<y<net a(y)-a(x) = k-a(y). Exemple élaboré Pour n=5: On a …

2
Taxi me quelques chiffres
Les numéros de taxis ou OEIS A011541 sont les plus petits nombres pouvant être représentés sous la forme de n sommes différentes de deux entiers cubes positifs, pour n successifs . Vous devrez imprimer le n ème numéro de taxi. Cela devrait fonctionner pour tout n en théorie. Cependant, comme …

1
Aidez-moi à remplir mon portefeuille!
Il y a quelque temps, j'ai acheté un nouveau portefeuille qui peut contenir 8 cartes (4 des deux côtés). Cependant, il me semble que j'ai beaucoup plus de cartes que cela et je dois faire des choix sur celles que je veux emporter avec moi. Certaines cartes que j'utilise plus …



4
Les Incorruptibles
Nombres intouchables α Un nombre intouchable est un entier positif qui ne peut pas être exprimé comme la somme de tous les diviseurs propres d'un entier positif (y compris le nombre intouchable lui-même). Par exemple, le nombre 4 n'est pas intouchable car il est égal à la somme des diviseurs …

En utilisant notre site, vous reconnaissez avoir lu et compris notre politique liée aux cookies et notre politique de confidentialité.
Licensed under cc by-sa 3.0 with attribution required.