In this challenge, would setting the language's base to 16 and then reading a base-10 integer that automatically converts to the default base be allowed?
(I really hate the 'no hex builtins whatsoever' rule, it's useless and unclear anyway)
A mountain is defined to be a set of line segments whose first point has coordinates (0,a) where a > 0, and whose last point has coordinates (b,0), where b > 0. All intermediate points have a y-coordinate (ordinate) strictly greater than 0. You are given the points on the mountain sorted in ascen...
@ETHproductions Looks like you'll be doing full 2-ended dominoes. May I humbly suggest allowing an array of two faces as well as --- and |\n|\n|delimited ASCII art? Also, consider whether the two ends need to be rotated according to the orientation of the entire piece. And, may one end be rotated differently from the other?
@ETHproductions Would ⌹ be a valid response for [1,1]? ;-)
i should get off of PPCG because I'm too tired to do things properly
I was going to comment and then VTD the post and then I got distracted and forgot to comment and now I realize that commenting wouldn't've been particularly useful if OP couldn't get the question undeleted (not sure if owner can undelete after it's been VTD-deleted)
Drawing a domino
code-golf ascii-art
Given two digits 0-9 as input, output a domino (from the double-nine domino set) with these number of pips (dots) on the two faces. The ten possible faces look like this (separated by pipes):
| | o| o|o o|o o|o o o|o o o|o o o|o o o
...
Sight Matrix
code-golf matrix number
I haven't seen this done anywhere yet after a couple of searches, so I might as well post this anyways. If you see this done somewhere else, please tell me and I will delete this post.
The Story
You are a two meter tall sniper fighting in a war-torn ...
@ETHproductions I don't think so. We like making jokes, and kids often have toy menorahs.
@ETHproductions Looks great. One more relaxation of permitted format would be allowing False/True (instead of 0/1) for languages that sport such. I always try to add as many appropriate tags as possible so people can earn tag badges: stringnumbergameinteger…
Output One More then Int Max code-golf arithmetic intager
Your job is to create a program or function that will output a whole number (with no trailing decimal points) that is 1 great then the max number an integer can hold for the language; more or less this:
MAX_INT + 1
You are not allowed...
Any sandbox review for this or this? (not my challenges) I think the first one is pretty good, not sure why it has 1 downvote, and the second one - I can't understand at all.
(This might be quite classic but this is my first post here, so I'm not ready for the fancy stuff yet)
The Goodstein sequence is defined for an input number as follows:
Pick a starting number n, let b=2 and repeat:
write n in heriditary base b notation
substitute all the (b)s to (b+1)s in n a...
Challenge
Given a whole number divisible by 9 and one missing digit, find the missing digit.
The missing digit may be represented by any character other than the digits 0-9 as long as it is consistent.
If the missing digit could be 0 or 9, output "0 or 9"!
Assume the user is intelligent enoug...
thanks, also, if you have a function y=x+3, would saying y(3) to denote the y-value at x=3 be correct? or do you need to define f(x)=x+3 and then go f(3) instead?
In Jelly would fØD remove all nondigits from an input
Anonymous
@Cowsquack The former is a common abuse of notation, but should be fine. y = x+3 means "the value of y is determined by the value of x via the function x+3". If you're trying to be rigorous, defining f(x) = x+3 or f(x) = y would be better.
Not-So-Simple Simplex
(Note: should I name it Complex Simplex?)
A simplex is an n-dimensional analog of a triangle. Thus, a 3-dimensional simplex is a tetrahedron. We want to find the number of points with integer coordinates (lattice points) strictly on the interior of this simplex. A point th...
Task
Given a word, check how it's typped on a QWERTY keyboard, and output what direction(s) it goes without oscillation
Keyboard layot:
Q W E R T Y U I O P
A S D F G H J K L
Z X C V B N M
You can move 4 basic directions (and their combination):
North
South
East
West
For example, the ...
That's definitely a bug. Because @HyperNeutrino forgot to wrap numbers in rational wrapper if it is evaluated in list, (Try it online!) the argument must be hardcoded in the code. @BruceForte
Introduction
This challenge requires you to set the trailing zeros of an integers binary representation to 010101…, this is best explained with an example:
Given the integer 400, the first step is to convert it to binary:
110010000
As we can see the fifth bit is the least significant 1 bit, ...
Blockchains are very complex things thahat power bitcoin and some other cryptocurrencies. Pretty easy right? Probably not.
Example output:
block 1 has been added on date (somedate) with a hash of (somehash)
block 2 has been added on date (somedate) with a hash of (somehash)
etc..
Rules:
mus...
CMC: given inputs, weights and biases of a neural network (feedforward with sigmoid (1/(1+e^-x)) activation functions), return the output of the NN. For example, if the inputs are 3 ¯0.5 and weights are 0.2 0 ¯0.5 (first neuron) 1 ¯2 0.25 (second neuron) for the first layer and 0.1 1.5 4 (for the three neurons respectively of the hidden layer) for the second layer, the bias 1 2 3 (respectively for the three neurons in the hidden layer) and 0.0375 (for the output neuron) return 0.9912865368
(that was a 2-3-1 network, 2 input neurons, 3 hidden, and 1 output)
Inspired by this challenge.
Definition
I will define a spiral matrix as a matrix that has all entries equal to 0, except a spiral of nonzero numeric entries. You can assume the nonzero entries are all positive or all negative if that helps. The spiral may "exit" and "reenter" the matrix, and th...
inspired by this chat conversation
A satisfying number is a number whose decimal representation is of the form abx, with the following properties:
x is the longest trailing repeating suffix, or the last digit if there is no repetition at the end (123333 -> 3333, 545656 -> 5656, 123 -> 3)
b is ...
Sandbox Notes
Is this a dupe?
Should I clarify the spec?
Should I use different characters for * and +? (* actually acts like regex +, so the way to do a real Kleene star is *_|.
Should I add more test cases?
Can I simplify some of the test cases?
Complement of a Regex
co...
I posted this challenge a while ago, which concerns how many elves Santa needs to deliver presents.
Due to population increase, Santa is a little more pressed for time this year. Although in the past we operated very asynchronously, we are beginning to experiment with being more and more synchr...
How can i disable Selective Acknowledgment (SACK) option in windows server 2008 .
How can i know it's status on the server if it's enabled or disabled .
Thanks,
does anybody know of a regex that only matches a character when it's not in delimiters? for some reason, the one I'm using for Ohm right now doesn't always work properly