Pertanyaan yang diberi tag «string»

Persaingan untuk memecahkan masalah tertentu melalui penggunaan dan manipulasi string.

17
Penghitungan Garis Alfanumerik dan Kurva
Diberikan string input, tulis program yang menampilkan jumlah total garis dan kurva yang dimilikinya. Tantangan Ambil input dari STDIN, atau metode input lainnya. Output ke STDOUT, atau metode output lainnya, jumlah total garis dan kurva yang terkandung dalam string, dalam urutan itu , berdasarkan tabel di bawah ini dalam snipet …

28
Transisi String ke Bit
Tugas Diberikan string input dari satu atau lebih karakter ASCII dengan titik codep antara 0 dan 128 (eksklusif), lakukan hal berikut: Konversi setiap karakter menjadi kode ASCII 7-bitnya (jika kode ASCII kurang dari 7 bit, masukkan nol bit di depan) Menggabungkan semua bit (ini menghasilkan 7*nbit di mana njumlah karakter) …

6
Buat pintasan keyboard untuk menu
Pintasan Menu Secara tradisional, menu pengguna dapat diakses dengan cara pintas keyboard, seperti Alt + (a letter), atau bahkan hanya menekan huruf ketika semua kotak teks tidak fokus ( gaya gmail ). Tugas Anda Mengingat entri menu sebagai input, tugas Anda adalah memberikan setiap entri menu surat jalan pintas yang …
10 code-golf  string 

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 

9
Ketik-periksa ekspresi
Diberikan ekspresi infiks, tentukan apakah semua konstanta memiliki tipe yang sama. Operator hanya akan terdiri dari operator diad ini :+-/* Program atau fungsi Anda harus mengambil string ekspresi yang valid sebagai input, dan menampilkan nilai kebenaran jika konstanta dalam ekspresi adalah waktu yang sama, dan nilai falsey sebaliknya. Ekspresi hanya …

3
Urutan kamus Korea Utara
Objektif Diberikan string suku kata Hangul, urutkan karakter dalam urutan kamus Korea Utara. Pengantar suku kata Hangul Hangul (한글) adalah sistem penulisan Korea yang diciptakan oleh Sejong the Great. Suku kata Hangul dialokasikan dalam titik Unicode U + AC00 - U + D7A3. Suku kata Hangul terdiri dari konsonan awal, …

4
Apakah ini Valid Dimodifikasi UTF-8?
UTF-8 adalah cara yang relatif sederhana untuk menyandikan titik kode Unicode dalam format lebar variabel sehingga tidak mudah membingungkan kode yang tidak disadari Unicode. Ikhtisar UTF-8 Byte dalam kisaran 1-0x7F, inklusif, biasanya valid Bytes dengan pola bit 10XX XXXXdianggap sebagai byte lanjutan, dengan enam bit paling tidak signifikan yang digunakan …

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 

3
Mensimulasikan Menabrak Mobil
pengantar Saya memiliki beberapa mobil ASCII yang memiliki kecepatan dan arah. Kecepatan mereka diwakili oleh jumlah mereka. Jika mobil itu <>maka itu telah berhenti. Sebagai contoh: <> 1> 2> 3> Setelah satu detik, saya mengerti <> 1> 2> 3> Setelah dua, saya mengerti <> 1> 2> 3> Jika dua mobil …

5
Bahasa Jerman flip-case
Diberikan string Jerman dan indikasi case (bawah / atas / judul), lipat string ke case itu. Spesifikasi Input hanya terdiri dari a- zplus äöüß-,.;:!?'"dalam huruf besar dan / atau huruf kecil. Kasus target dapat dianggap sebagai tiga nilai unik (harap jelaskan apa itu) dari jenis yang konsisten; baik tiga karakter, …

30
Keluarkan beberapa kata yang dipesan
Untuk bahasa komputer, kata yang dipesan adalah kata yang tidak dapat digunakan sebagai pengidentifikasi, seperti nama variabel, fungsi, atau label. Untuk bahasa komputer lainnya, kata kunci dapat dianggap sebagai set instruksi bahasa. Tantangan Dengan menggunakan bahasa pilihan Anda, tulis kode dalam bahasa yang dipilih yang memberikan angka antara satu dan …

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 

4
Badugi, Siapa yang Menang?
Terinspirasi oleh tantangan ini dan terkait dengan yang ini . Latar Belakang Badugi [bæduːɡiː] adalah varian draw-poker low-ball. Ajang Poker Online Piala Dunia Pokerstars $ 1K akan dimulai dalam 3 jam dan aku harus tahu seberapa bagus tanganku! Gim ini menggunakan dek standar yang terdiri dari 52 kartu empat suit …

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.