### Communities

tag:snake search within a tag
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
created:<1w created < 1 week ago
post_type:xxxx type of post
Challenges

# Posts tagged number

This tag doesn't have any usage information yet.

This tag doesn't have a detailed wiki yet.

19 posts
66%
+2 −0

Convert a matrix or grid of digits to its antitranspose. For a square matrix , this is its reflection in its antidiagonal. More generally, for a rectangular matrix, this is its reflection in its sk...

4 answers  ·  posted 3mo ago by trichoplax‭  ·  last activity 2mo ago by torres‭

Question code-golf number
86%
+11 −0

Challenge idea taken from: Eliseo D'Annunzio Task Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, dou...

22 answers  ·  posted 12mo ago by Razetime‭  ·  last activity 3mo ago by taoh‭

71%
+3 −0

Take an input string representing a number and convert it to decimal (base 10). However, the base of the input is not specified. Assume the input is in the smallest base for which its digits are va...

5 answers  ·  posted 4mo ago by trichoplax‭  ·  last activity 4mo ago by Shaggy‭

60%
+4 −2

In this challenge, add 2 integers, but if both the integers are 2, output 5. Shortest code in each language wins! Example ungolfed program in Python 3.x def add(x, y): if x == 2 and y == 2: ...

18 answers  ·  posted 1y ago by General Sebast1an‭  ·  last activity 8mo ago by south‭

Question code-golf math number
75%
+4 −0

Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&amp;\mbox{if }n=0;\\1&amp;\mbox{if }n=1;\\2P_{n-1}+P_{n-2... 9 answers · posted 2y ago by Razetime‭ · last activity 8mo ago by torres‭ 81% +7 −0 Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of$3x + 1$, and it is applied this way: If$x$is odd... 15 answers · posted 1y ago by General Sebast1an‭ · last activity 8mo ago by torres‭ Question code-golf math number 85% +10 −0 Challenge A catalogue type challenge that simply asks: Given an integer n (where n&gt;=0) as input return a truthy value if n is a perfect square or a falsey value if not. Rules You may take... 20 answers · posted 1y ago by Shaggy‭ · last activity 9mo ago by Zakk‭ 33% +1 −4 In this simple challenge, create a short program that takes 2 ints as input, output them, swap their places, then output them again. Those 2 integers can't be the same number. The program with the ... 7 answers · posted 1y ago by General Sebast1an‭ · last activity 11mo ago by south‭ Question code-golf number 66% +2 −0 Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value... 14 answers · posted 1y ago by General Sebast1an‭ · last activity 12mo ago by Olin Lathrop‭ Question code-golf number 81% +7 −0 Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. The program must figure out how to get the 2 fir... 5 answers · posted 1y ago by General Sebast1an‭ · last activity 1y ago by radarek‭ Question code-golf math number 81% +7 −0 Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested... 10 answers · posted 2y ago by Wezl‭ · last activity 1y ago by radarek‭ Question code-golf number 71% +3 −0 Given a non-negative integer up to$999\,999\,999$, write it in English. The input number can be in any form other than English (though you'll typically want to use the native integer type of your... 3 answers · posted 1y ago by celtschk‭ · last activity 1y ago by Moshi‭ 71% +3 −0 Imagine you have only one byte (8 bits) to store a value, but need to store values from$0$to$4032$. Impossible, until you are also told that an error of 1/64 of the exact value does not matter. ... 2 answers · posted 1y ago by celtschk‭ · last activity 1y ago by General Sebast1an‭ Question code-golf number 77% +5 −0 Rational numbers in decimal representation can have an infinite periodic part. One common way to write this down is to repeat the periodic digits and then add three dots. Numbers without those thre... 2 answers · posted 1y ago by celtschk‭ · edited 1y ago by General Sebast1an‭ 60% +1 −0 Create a program that gets all perfect squares starting from 0 or 1 without using any methods of multiplication (repetitive addition) and exponentiation (repetitive multiplication). Output them for... 7 answers · posted 1y ago by General Sebast1an‭ · last activity 1y ago by General Sebast1an‭ 75% +4 −0 Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 * 32) + (1 * 31) + (−1 * 30) = [1,1,-1] or ... 3 answers · posted 1y ago by Razetime‭ · last activity 1y ago by Moshi‭ Question code-golf number base 80% +6 −0 A Juggler sequence is a sequence that begins with a positive integer$a_0$and each subsequent term is calculated as:$\$a_{k+1} = \begin{cases} \left \lfloor a_k ^ \frac 1 2 \right \rfloor, &amp;...

9 answers  ·  posted 1y ago by caird coinheringaahing‭  ·  last activity 1y ago by Shaggy‭

80%
+6 −0

Using your languages of choice, golf a quine - a non-empty program taking no input and only outputting its source. Here, the win condition is your quine working in the most languages. It should be...

1 answer  ·  posted 1y ago by AndrewTheCodegolfer‭  ·  last activity 1y ago by General Sebast1an‭

71%
+3 −0

The Rules In this game, each round, every player faces off against every other player in a round robin format. In each match, players pick 3 positive integers that sum to 360. Let's say player 1 p...

2 answers  ·  posted 1y ago by Quintec‭  ·  last activity 1y ago by Moshi‭

Featured
Hot Posts

This community is part of the Codidact network. We have other communities too — take a look!