Pertanyaan yang diberi tag «sequence»

Untuk tantangan yang melibatkan semacam urutan.

7
Kode-Golf: Urutan Farey (I)
Tantangan Dalam tugas ini Anda akan diberi bilangan bulat N (kurang dari 10 ^ 5), menampilkan urutan Farey dari urutan N. Input N diberikan dalam satu baris, input diakhiri oleh EOF. Memasukkan 4 3 1 2 Keluaran F4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1} F3 = {0/1, 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 

2
Tips untuk bermain golf di The Powder Toy
Bersenang-senang dengan yang satu ini, The Powder Toy adalah tantangan yang menarik untuk golf, terutama dengan logika filt. Hal yang membuat TPT menjadi tantangan adalah banyaknya banyak banyak cara untuk mendekati masalah: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall logic? Karena itu, …
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 pseudoprimes!
Pendahuluan / Latar Belakang Dalam sebuah diskusi baru - baru ini di chat crypto saya ditantang untuk berdiskusi / membantu dengan tes primality Fermat dan angka-angka Carmichael. Tes ini didasarkan pada premis yang a^(p-1) mod p==1akan selalu berlaku untuk bilangan prima p, tetapi tidak selalu untuk komposit. Sekarang nomor carmichael …
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
Luaskan Chains Perbandingan
Tidak seperti kebanyakan bahasa, Python mengevaluasi a<b<ckarena akan dilakukan dalam matematika, sebenarnya membandingkan tiga angka, yang bertentangan dengan membandingkan boolean a<buntuk c. Cara yang benar untuk menulis ini dalam C (dan banyak lainnya) adalah a<b && b<c. Dalam tantangan ini, tugas Anda adalah untuk memperluas rantai perbandingan dengan panjang sewenang-wenang …
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
Diberikan input int n, cetak n * terbalik (n)
Diberikan bilangan bulat n, cetakn * reversed(n) reversed(n)adalah angka yang Anda dapatkan ketika Anda reversedigit 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 Kode terpendek menang! Papan …
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
Tukar Urutannya
Tugas Anda adalah menulis beberapa kode yang menghasilkan urutan OEIS, dan berisi nama urutan dalam kode ( A______). Cukup mudah bukan? Nah begini, kode Anda juga harus menampilkan urutan terpisah kedua ketika nama urutan dalam kode diubah menjadi nama urutan kedua. Input output Kode Anda dapat berupa fungsi atau program …

4
Pesanan Set Mia
Game dadu Mia memperkenalkan urutan set yang sangat non-sepele ukuran dua: {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} Secara umum, urutan dalam tupel tidak masalah {x,y}={y,x}, {1,2}lebih besar dari yang lain, Pasangan …

5
Hitung jumlah urutan jarak Hamming
The Hamming jarak antara dua string dengan panjang yang sama adalah jumlah posisi di mana yang sesuai simbol yang berbeda. Membiarkan Pmenjadi string biner panjang ndan Tmenjadi string biner panjang 2n-1. Kita dapat menghitung njarak Hamming antara Pdan setiap nsubstring Tdengan panjang dari kiri ke kanan dan menempatkannya ke dalam …


7
Urutan Szekeres
Definisi a(1) = 1 a(2) = 2 a(n)adalah angka terkecil k>a(n-1)yang menghindari perkembangan aritmatika 3-term dalam a(1), a(2), ..., a(n-1), k. Dengan kata lain, a(n)adalah angka terkecil k>a(n-1)sehingga tidak ada x, di ymana 0<x<y<ndan a(y)-a(x) = k-a(y). Contoh berhasil Untuk n=5: Kita punya a(1), a(2), a(3), a(4) = 1, 2, …

2
Taksi saya beberapa nomor
Nomor Taksi atau OEIS A011541 adalah angka terkecil yang dapat direpresentasikan sebagai n jumlah yang berbeda dari dua bilangan bulat dadu positif, untuk berturut-turut n . Anda harus mencetak nomor taksi yang ke- n . Ini harus bekerja untuk setiap n dalam teori. Namun, karena hanya 6 nomor taksi yang …

1
Bantu saya mengisi dompet saya!
Beberapa waktu yang lalu saya membeli dompet baru yang dapat menampung 8 kartu (4 di kedua sisi). Namun, saya tampaknya memiliki kartu yang jauh lebih banyak dari itu dan saya harus membuat pilihan kartu mana yang ingin saya bawa. Beberapa kartu yang saya gunakan lebih sering daripada yang lain, tetapi …

3
Drop of Chaos (Membangun Urutan Aperiodik Minimal)
Idenya di sini adalah untuk menghasilkan pola yang hampir berulang. Artinya, urutan yang sedang dibangun berubah pada saat terakhir untuk menghindari pengulangan dari beberapa berikutnya. Selanjutnya tipe AA dan ABA harus dihindari (di mana B tidak lebih dari A). Contoh: Saya akan melanjutkan dan mulai dengan mendaftar semua contoh kecil …

7
Sungai Digital (Solusi Terpendek Dan Tercepat)
Ini adalah pertanyaan pertama saya, jadi saya harap ini berjalan dengan baik. Latar Belakang: Bukan sungai yang mungkin Anda pikirkan. Pertanyaannya berkisar pada konsep sungai digital. Sebuah sungai digital adalah urutan angka dimana jumlah berikut nadalah nditambah jumlah digit. Penjelasan: 12345 diikuti oleh 12360 karena 1 + 2 + 3 …

4
The Untouchables
Angka yang Tidak Tersentuh α Bilangan tak tersentuh adalah bilangan bulat positif yang tidak dapat dinyatakan sebagai jumlah dari semua pembagi yang tepat dari bilangan bulat positif apa pun (termasuk bilangan tak tersentuh itu sendiri). Misalnya, angka 4 tidak tersentuh karena sama dengan jumlah pembagi yang tepat dari 9: 1 …

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.