«sequence» etiketlenmiş sorular

Bir çeşit diziyi içeren zorluklar için.

7
Code-Golf: Farey dizisi (I)
Meydan okuma Bu görevde bir tamsayı N (10 ^ 5'ten az) verilecek , Farey sırasının N sırasını vereceksiniz . Giriş N tek bir satırda verilir, girişler EOF tarafından sonlandırılır. Giriş 4 3 1 2 Çıktı F4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1} F3 = {0/1, 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 

2
Powder Toy'da golf için ipuçları
Bu ile eğlenin, Toz Oyuncak özellikle filtre mantığı ile golf için ilginç bir meydan okuma. TPT'yi zorlaştıran şey, bir probleme yaklaşmanın birçok çok yoludur: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall logic? Gibi, TPT golf ipuçları için bir yer oldukça yararlı olacaktır, …
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
Sahte sahte Golf!
Giriş / Arka Plan Bir de son tartışmada yer kripto sohbet Birlikte / yardım görüşmek üzere meydan Fermat asallık testi ve Carmichael numaraları. Bu test a^(p-1) mod p==1her zaman primler için geçerli olacak p, ancak her zaman kompozitler için geçerli olmayan öncüllere dayanmaktadır . Bir dizi kendisi için: Artık bir …
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
Expand Karşılaştırma Zincirleri
Çoğu dilden farklı a<b<colarak Python , boole a<bile karşılaştırmanın aksine, aslında üç sayıyı karşılaştırarak matematikte olduğu gibi değerlendirir c. Bunu C (ve diğerleri) yazmanın doğru yolu olurdu a<b && b<c. Bu meydan okumada, göreviniz keyfi uzunluklardaki bu tür karşılaştırma zincirlerini Python / sezgisel sunumdan diğer dillerde nasıl yazılacağına genişletmektir. Özellikler …
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 

30
İnt girişi n verildiğinde, çıktı n * ters çevrilmiş (n)
Bir tam sayı verildiğinde n, çıktı alınn * reversed(n) reversed(n)reverserakamları ile elde ettiğiniz sayıdır 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 En kısa kod kazanır! Liderler …
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
Diziyi Değiştir
Göreviniz OEIS dizisi çıktısı veren ve kodun ( A______) içindeki dizinin adını içeren bir kod yazmaktır . Yeterince kolay değil mi? İşte yakalama, koddaki dizinin adı ikinci dizinin adı olarak değiştiğinde, kodunuzun ikinci bir ayrı diziyi de çıkarması gerekir. Giriş çıkış İşletme kodu alan bir fonksiyon ya da tam bir …

4
Mia Set Siparişi
Zar oyunu Mia , iki büyüklükteki setlerin çok önemsiz bir sırasını sunuyor: {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} Genel olarak, bir demet içindeki düzen önemli değildir {x,y}={y,x}, {1,2}her şeyden daha büyüktür, …

5
Hamming mesafe dizilerinin sayısını sayın
Hamming mesafesi eşit uzunlukta iki sırası arasındaki karşılık gelen simgeler farklı olan pozisyonların sayısıdır. Izin Pvermek bir ikili dize uzunluğu nve Tbir ikili dize uzunluğu 2n-1. Soldan sağa sırayla nHamming mesafelerini Pve her nuzunluktaki alt dizelerini hesaplayabilir Tve bunları bir diziye (veya listeye) koyabiliriz. Örnek Hamming mesafe sırası Bırakın P …

1
N geçişli ana düğüm sayısı
Bir asal düğüm geçerli: önemsiz olmayan bir düğüm, önemsiz olmayan iki düğümün düğüm toplamı olarak yazılamaz. Bir düğüm toplamının açıklaması : iki düğümü yan yana koyun, ... sonra her iki tarafa aynı şeritte aralarına iki çizgi çizin ve çizdiğiniz çizgiler arasındaki parçayı çıkarın. İki düğümün bu bileşimi yeni, asal olmayan …

7
Szekeres dizisi
Tanım a(1) = 1 a(2) = 2 a(n)içinde k>a(n-1)herhangi bir 3-dönemli aritmetik ilerlemeyi önleyen en küçük sayıdır a(1), a(2), ..., a(n-1), k. Başka bir deyişle, orada olmayan , nerede ve olmayan a(n)en küçük sayıdır .k>a(n-1)xy0<x<y<na(y)-a(x) = k-a(y) Çalışılan örnek Şunun için n=5: Sahibiz a(1), a(2), a(3), a(4) = 1, 2, …

2
Bana bazı numaralar taksi
Taxicab Sayıları veya OEIS A011541 birbirini izleyen n için iki pozitif küp tamsayının n farklı toplamı olarak temsil edilebilen en az sayıdır . Sen çıktısını gerekir n taksi sayısının inci. Bu teoride herhangi bir n için işe yarayacaktır . Ancak, şimdiye kadar sadece 6 taksi numarası keşfedildiğinden, 6'nın üstünde n …

1
Cüzdanımı doldurmama yardım et!
Bir süre önce 8 kart (her iki tarafta 4 adet) tutabilen yeni bir cüzdan satın aldım. Ancak, bundan daha fazla kartım var ve benimle taşımak istediğim şeyleri seçmem gerekiyor. Bazı kartlar diğerlerinden daha sık kullanıyorum, ama yanımda taşımayı tercih ettiğim kartlar mutlaka en çok kullandığım kartlar değil. Meydan okuma Bir …

3
Kaosun Düşmesi (Minimal Aperiodik Bir Dizinin Oluşturulması)
Buradaki fikir, neredeyse tekrar eden bir model üretmektir . Yani, inşa edilmekte olan dizi, bir sonraki alt dizinin tekrarını önlemek için son anda değişir. AA ve ABA tipi alt sıralardan kaçınılmalıdır (burada B, A'dan uzun değildir). Örnekler: Devam edeceğim ve açıklamamı daha net hale getirmek için tüm küçük örnekleri listeleyerek …

7
Digital River (En Kısa Ve En Hızlı Çözüm)
Bu benim ilk sorum, umarım iyi gidiyor. Arka fon: Düşündüğünüz nehirler değil. Soru, dijital nehir kavramı etrafında dönüyor. Dijital bir nehir sayısı aşağıdaki bir sayı dizisi nolup nartı basamak toplamıdır. Açıklama: 12345 12360 1 beri + 2 + 3 + 4 + 5 = 15 izledi ve böylece 12345 + …

4
Dokunulmazlar
Dokunulmaz Sayılar α Dokunulmaz bir sayı, herhangi bir pozitif tamsayının (dokunulmaz sayının kendisi dahil) tüm uygun bölücülerinin toplamı olarak ifade edilemeyen pozitif bir tamsayıdır. Örneğin, 4 sayısı, 9: 1 + 3 = 4'ün uygun bölücülerinin toplamına eşit olduğu için dokunulmaz değildir. 5 sayısı, herhangi bir pozitif tamsayının uygun bölücülerinin toplamı …

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.