Code Golf Stack Exchange[B!]新着記事・評価 - はてなブックマーク (original) (raw)

26 users
codegolf.stackexchange.com
Fizz Buzz is a common challenge given during interviews. The challenge goes something like this: Write a program that prints the numbers from 1 to n. If a number is divisible by 3, write Fizz instead. If a number is divisible by 5, write Buzz instead. However, if the number is divisible by both 3 and 5, write FizzBuzz instead. The goal of this question is to write a FizzBuzz implementation that go

3 users
codegolf.stackexchange.com
NPM's sloc is a moderately popular tool for counting source lines of code in a file. The tool will attempt to strip out both single and multiline comments and count the remaining lines in order to get an estimate of the 'true' number of lines of code. However, the parser used is based on regular expressions and is quite simple, so it can be tricked. In this challenge, you will need to construct a

7 users
codegolf.stackexchange.com
Here is a theoretical question - one that doesn't afford an easy answer in any case, not even the trivial one. In Conway's Game of Life, there exist constructs such as the metapixel which allow the Game of Life to simulate any other Game-of-Life rule system as well. In addition, it is known that the Game of Life is Turing-complete. Your task is to build a cellular automaton using the rules of Conw

25 users
codegolf.stackexchange.com
Your task is to build a Game of Life simulation representing a digital clock, which satisfies the following properties: The clock displays the hours and minutes in decimal (e.g. 12:00, 3:59, 7:24) with a different state for each of the 1,440 minutes of the day — either the hours will go from 0 to 23 or from 1 to 12 with a PM indicator. The pattern is periodic, and the state loops around without an

7 users
codegolf.stackexchange.com
Introduction You're probably familiar with zip bombs, XML bombs, etc. Put simply, they are (relatively) small files which produce enormous output when interpreted by naïve software. The challenge here is to abuse a compiler in the same way. Challenge Write some source code which occupies 512 bytes or less and which compiles into a file which occupies the most possible space. Largest output file wi

4 users
codegolf.stackexchange.com
The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius cipher. It looks like this: ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD FGHIJKLMNOPQRSTUVWXYZABCDE GHIJKLMNO

13 users
codegolf.stackexchange.com
There are some pretty cool challenges out there involving regex (Self-matching regex, Regex validating regex) This may well be impossible, but is there a regex that will ONLY match itself? NOTE, delimiters must be included: for example /thing/ must match /thing/ and not thing. The only match possible for your expression must be the expression itself. Many languages allow the implementation of a st

4 users
codegolf.stackexchange.com
Stack Exchange Network Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

6 users
codegolf.stackexchange.com
What general tips do you have for golfing in JavaScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. "remove comments" is not an answer). Note: Also see Tips for Golfing in ECMAScript 6 and above

16 users
codegolf.stackexchange.com
Stack Exchange Network Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

4 users
codegolf.stackexchange.com
What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is not an answer). Please post one tip per answer.