Pertanyaan yang diberi tag «geometry»

Tantangan ini dimaksudkan untuk diselesaikan dengan menggunakan, memanipulasi, atau membuat bentuk atau struktur geometris lainnya.

10
Hasilkan segitiga siku-siku
Dalam tantangan ini, Anda harus mengambil dua angka (dipisahkan oleh spasi) sebagai input dan output segitiga kanan ASCII, terdiri dari xs. Angka pertama adalah lebar dan tinggi segitiga yang harus Anda hasilkan. Angka kedua adalah sudut mana sudut kanan berada. Sudut diberi nomor 1 hingga 4, mulai dari kiri atas …

2
Wilayah poligon reguler
Diberikan N-gon reguler dengan semua diagonal digambar, berapa banyak daerah yang terbentuk diagonal? Misalnya, segitiga biasa memiliki tepat 1, kuadrat memiliki tepat 4, pentagon memiliki tepat 11, dan segi enam memiliki 24. skor berbanding terbalik dengan jumlah byte dalam solusi faktor fudge kecil dapat ditambahkan ke skor berdasarkan runtime mereka …

2
Pesawat meledak
The Pukulan-up adalah alat yang ampuh dalam geometri aljabar. Hal ini memungkinkan penghapusan singularitas dari set aljabar sambil mempertahankan sisa struktur mereka. Jika Anda tidak terbiasa dengan hal itu, jangan khawatir, perhitungan yang sebenarnya tidak sulit untuk dipahami (lihat di bawah). Berikut ini kami sedang mempertimbangkan meledakkan titik (0,0)(0,0)(0,0) dari …

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 

5
Sistem elips
pengantar Diberi lima poin di pesawat, tugas Anda adalah menghitung luas elips yang melewati titik-titik ini. Anda dapat mengasumsikan bahwa satu elips non-degenerasi dapat dibangun dengan nilai input yang diberikan. Aturan Input adalah 10bilangan bulat dalam bentuk apa pun, yang sesuai dengan xdan ytitik koordinat. Misalnya, Anda dapat mengambil input …

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 

2
Sepuluh ratus kata yang paling umum
Pertanyaan ini ditulis karena "Penjelasan Hal" menyenangkan untuk dibaca, dan memberi saya ide. Tulis "hal-hal yang membuat komputer melakukan hal-hal" yang membaca / mengambil set huruf, angka dan hal-hal seperti ini "#%|?dan kembali True / 1jika semua kata adalah bagian dari set ini . Jika semua kata bukan bagian dari …
9 code-golf  string  parsing  code-golf  array-manipulation  random  permutations  code-golf  string  code-golf  parsing  code-golf  string  quine  code-golf  string  parsing  comment  code-golf  string  counting  natural-language  code-golf  string  decision-problem  code-golf  math  code-challenge  metagolf  test-battery  code-golf  string  code-golf  math  number  arithmetic  source-layout  code-golf  number  primes  decision-problem  code-golf  math  arithmetic  code-golf  date  code-golf  string  cryptography  code-golf  code-golf  chess  board-game  code-golf  geometry  grid  puzzle-solver  set-partitions  code-golf  number  natural-language  code-golf  ascii-art  code-golf  math  code-golf  string  ascii-art  kolmogorov-complexity  code-golf  string  natural-language  code-golf  game  board-game  tic-tac-toe  code-golf  ascii-art  hexagonal-grid  code-golf  string  comment  code-golf  internet  code-golf  sorting  code-golf  kolmogorov-complexity  unicode  code-golf  tips  code-golf  string  natural-language  code-golf  string  kolmogorov-complexity  source-layout  hello-world  code-golf  string  kolmogorov-complexity  counting  natural-language  code-golf  random  quine  code-golf  string  math  bitwise  code-golf  permutations  code-golf  string  code-golf  arithmetic 

1
Flexagation fleksibel
Menjadi programmer, menonton kami fleksibel tidak terlalu menarik. Hari ini kita mengubahnya! Dalam tantangan ini Anda akan lex dan flex hexaflexagons. Tentang Untuk pengantar video, tonton video viharts di flexagons Flexagon adalah bentuk yang dapat Anda tekuk untuk menunjukkan wajah selain yang atas dan bawah; kami membuat hexahexaflexagon, yang memiliki …

2
Temukan luas poligon
Dengan panjang sisi berurutan s1, s2, s3... s_nn-gon yang tertulis dalam lingkaran, temukan luasnya. Anda dapat mengasumsikan bahwa poligon itu ada. Selain itu, poligon akan menjadi cembung dan tidak berpotongan sendiri, yang cukup untuk menjamin keunikan. Built-in yang secara khusus mengatasi tantangan ini, serta fungsi built-in yang menghitung circumradius atau …

7
Cetak simpul kubus dan segitiga penutupnya
Koordinat keluaran dari simpul kubus. Kemudian, buatlah daftar dua belas segitiga yang akan menutupi kubus, setiap segitiga menjadi daftar tiga indeks-simpul, yang berorientasi secara konsisten. Output harus berupa string ASCII dengan angka desimal yang berbeda. Golf ini tidak memiliki input. Pemenang adalah karakter paling sedikit, di mana set karakter adalah …

1
Partisi dan Restrukturisasi
Dengan diberikan dua bentuk yang berdekatan dari area yang sama, tentukan cara optimal untuk membagi bentuk pertama menjadi jumlah minimum segmen yang berdekatan sehingga dapat disusun ulang untuk membentuk bentuk kedua. Dengan kata lain, temukan jumlah minimum segmen yang diperlukan yang dapat membentuk kedua bentuk tersebut. "Berdampingan" berarti bahwa setiap …

2
Bisakah wadah ini menampung cairan sebanyak ini?
Bisakah wadah ini menampung cairan sebanyak ini? Tantang Sinopsis Seperti yang kemungkinan besar Anda ketahui, cairan memiliki bentuk yang tidak terbatas dan volume yang pasti. Karena itu, mereka selalu mengambil bentuk wadah mereka. Namun, mereka tidak dapat memperluas untuk mengisi wadah mereka. Tugas Anda hari ini adalah menentukan apakah cairan …

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.