«geometry» etiketlenmiş sorular

Bu zorluğun, şekiller veya diğer geometrik yapılar kullanılarak, manipüle edilerek veya yaratılmasıyla çözülmesi amaçlanmıştır.

10
Doğru bir üçgen oluşturun
Bu meydan okumada, giriş olarak iki sayı (boşlukla ayrılmış) almalı ve xs'den oluşan bir ASCII sağ üçgeni çıkarmalısınız. İlk sayı, çıkmanız gereken üçgenin genişliği ve yüksekliği olacaktır. İkinci sayı, sağ köşenin hangi köşede olacağı olacaktır. Köşeler sol üst köşeden başlayıp İngilizce okuma sırasına göre 1 ile 4 arasında numaralandırılmıştır: 1 …

2
Düzenli çokgen bölgeleri
Tüm köşegenleri çizilmiş düzenli bir N-gon verildiğinde, köşegenler kaç bölge oluşturur? Örneğin, normal bir üçgen tam olarak 1, bir kare tam olarak 4, beşgen tam olarak 11 ve bir altıgen 24'tür. skor, çözeltideki bayt sayısı ile ters orantılıdır çalışma sürelerine göre puanlara küçük geçiştirme faktörleri eklenebilir çokgeni çevreleyen bölge sayılmaz

2
Uçak havaya uçurmak
Blow-up cebirsel geometri güçlü bir araçtır. Bu kaldırılmasını verir Singularities gelen cebirsel kümeler kendi yapısının geri kalanını korurken. Eğer bunlardan herhangi birine aşina değilseniz, gerçek hesaplamanın anlaşılması zor değildir (aşağıya bakınız). Aşağıda cebirsel bir eğrinin noktasının 2D olarak patlamasını düşünüyoruz . 2B'deki bir cebirsel eğri, iki değişkenli bir polinomun sıfır-lokusu …

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 

5
Eliptik sistem
Giriş Düzlemde beş nokta verildiğinde, göreviniz elipslerin bu noktalardan geçen alanını hesaplamaktır. Verilen giriş değerleriyle tam olarak bir dejenere olmayan elips yapılabileceğini varsayabilirsiniz. kurallar Girdi, noktaların ve koordinatlarına 10karşılık gelen uygun herhangi bir biçimde tamsayılardır . Örneğin, girdiyi tamsayılar listesi olarak veya vb. Olarak alabilirsiniz. Ondalık sayıları da işleyebilirsiniz, ancak …

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 

2
En sık kullanılan on yüz kelime
Bu soru yazılmıştır, çünkü "Şey Açıklayıcı" okuması eğlenceli ve bana bir fikir verdi. Bir dizi harf, sayı ve bunun gibi şeyleri okuyan / alan "#%|?ve True / 1tüm sözcükler bu kümenin bir parçasıysa geri dönen "bilgisayarı bir şeyler yapan şeyler" yazın . Tüm kelimeler bu kümenin parçası değilse, parçası olmayan …
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
Flexagonal esneme
Programcı olmak, bizi esnek izlemek çok ilginç değil. Bugün bunu değiştiriyoruz! Bu meydan okumada lex ve flexaflexagons esnek olacak. hakkında Bir video tanıtımı için flexagons'ta viharts videolarını izleyin Flexagon, üst ve alt yüzler dışındaki yüzleri ortaya çıkarmak için esnetebileceğiniz bir şekildir; 6 yüzlü bir heksaheksaflexagon yapıyoruz. Bir hexahexaflexagon'ın bir kağıt …

2
Çokgenin alanını bulma
s1, s2, s3... s_nBir daire içine yazılan bir n-gon'un ardışık yan uzunlukları göz önüne alındığında , alanını bulun. Çokgenin var olduğunu varsayabilirsiniz. Ek olarak, çokgen dışbükey olacak ve kendi kendine kesişmeyecek, bu da benzersizliği garanti etmek için yeterli olacaktır. Bu zorluğu özel olarak çözen yerleşiklerin yanı sıra, çember veya çevreyi …

7
Bir küpün köşelerini ve kaplama üçgenlerini yazdırın
Bir küpün köşelerinin çıktı koordinatları. Daha sonra, küpü kaplayacak on iki üçgenden oluşan bir liste çıkın, her üçgen sürekli olarak yönlendirilmiş üç köşe indeksinin bir listesidir. Çıktı, farklı ondalık sayıdan oluşan bir ASCII dizesi olmalıdır. Bu golfün girişi yok. Kazanan, karakter kümesinin Unicode olduğu en az karakterdir. Örneğin, 0,0,0 ile …
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.