Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A competition to solve a particular problem through the usage and manipulation of numbers.
1
vote
Fill in the Number Blanks
Python 3, 232 bytes
Not really that short, but it uses a different method to the Python solution already posted
l=list(map(int,[y for x in input().split(',')for y in x.split(' ')]))
f=[];x=1
while …
3
votes
Comparing two numbers
Fourier, 147 74 bytes
Non-competing because string printing is newer than this challenge
I~AoI~B` is `<A{1}{`greater than`}A<B{1}{`less than`}A{B}{`equal to`}` `Bo
Try it on FourIDE!
Dunno why I …
0
votes
Swap the parity
Fourier, 17 bytes
I~x^ox%2{0}{@xvo}
Try it on FourIDE!
Explanation:
I~x - Stores input in a variable called x
x^o - Increments x and outputs
x%2{0}{ } - …
1
vote
Print number triangle
Noether, 39 bytes
I~A{A0>}{A(i1+~i(j1+~jP" "P£)"
"P0~ji)}
Try it here!
Explanation:
I~A - Push User Input onto the stack and store in variable A
{A0>} - If A>0
{ - Then do
A( - loop until to …
0
votes
Comparing two numbers
Noether, 91 79 bytes
I~aP" is "PI~b{ab=}{"equal to"P}{ab>}{"greater than"P}{ab<}{"less than"P}" "PbP
Try it here!
Note that while Noether is based heavily on Fourier, I have sacrificed golfability fo …
30
votes
61
answers
6k
views
Comparing two numbers
Challenge
Given two integers A and B as input, you must write a program which outputs if A>B, A==B or A<B.
The integers will be in any reasonable range supported by your language which includes at lea …
0
votes
Reciprocal of a number (1/x)
Fourier (Non-Competing), 79 bytes
1~RI~X<0{1}{0-1~R45a}X*R~XL*2+2/2~UX{1}{0~U}10P10/X~DL+U~p10Pp~TD/To*T~A46aD-Ao
Try it online!
This is non-competing for two reasons:
Firstly, it does not fulfi …
0
votes
Golf a transcendental number
Fourier, 16 bytes
I~NL~S10PS~XN/Xo
Try it online!
As other answers have done, outputs the first digit of the input.
An explanation of the code:
N = User Input
S = log(N)
X = 10 ^ S
Print (N/X)
0
votes
How long is my number?
Fourier, 30 bytes
I~S<0{1}{-2*S~S}S{0}{S^~S}SL^o
Try it on FourIDE!
Fourier doesn't have strings, so it uses logs instead. Bytes are wasted on supporting zero and negative numbers.
2
votes
Is this number triangular?
Fourier, 26 bytes
I~X1(&N^*N/2{X}{1~O}N=X)Oo
Try it online!
1
vote
Is this relationship creepy?
Fourier, 37 bytes
oI~AI~B>A{1}{A~SA~BS~B}A/2+7>B{1}{@o}
Try it on FourIDE!
Takes two numbers as input. Will golf later.
0
votes
A list of number modulus their indices in the list
Python 3, 46 bytes
lambda x:[0]+[x[i]%i for i in range(1,len(x))]
Simples ;)
1
vote
Test if two numbers are equal
Noether, 4 bytes
II=P
Try it online!
1
vote
Count Like a Babylonian
Noether, 55 bytes
I~sL(si/~c{"<"=}{k10+~k}c{"T"=}{!k}c{" "=}{k60*~k}!i)kP
Try it online!
Same approach as @Arnauld.
41
votes
27
answers
7k
views
Count Like a Babylonian
Challenge
Given an ASCII representation of a Babylonian number as input, output the number in Western Arabic numerals.
Babylonian Numeral System
How did the Babylonians count? … You then add up the value of each to get the value of the number.
Columns will be separated by spaces to prevent ambiguity. …