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
Rotate a number
Vyxal, 3 bytes
ǔṅ⌊
Try it Online or Verify all the test cases
2
votes
Batt to the Basics
Vyxal, 29 bytes
» 3J↔kṫ₅uR»₈τ20/41ẋfṗÞṡ'∑⁰=;h
Don't try it online! (it times out)
Add vøḋ to the end if it can't be returned as list of rationals instead of decimals. vøḋ will return a list of string …
2
votes
Letters in phone numbers
Vyxal, 14 bytes
ka:ż6+kiḭṪ9JṅĿ
Try it Online!
ka:ż6+kiḭṪ9JṅĿ
ka: # Push the alphabet twice
ż # Length range: [1..26]
6+ # Add 6: [7..32]
kiḭ # Floor div …
4
votes
Doing a little trolling with the microwave timer
Vyxal, 12 bytes
⁽⌊λ₁Ḋ40*›-;ŀ
Try it Online!
Port of Jelly answer. Takes single integer and outputs list of ints.
16 bytes taking second and minute.
1
vote
Rotate a number
Desmos, 76 70 bytes
f(n,m)=mod(n,t)10^d/t+floor(n/t)
d=floor(log(n+0^n))+1
t=10^{mod(m,d)}
Try it on Desmos!
Port of R answer.
-6 bytes thanks to Aiden Chow
1
vote
Square from Digits with Largest Sum
Vyxal G, 8 bytes
Ṗƛ²:∩J⌊∑
Try it Online!
Brute force, so pretty slow.
Ṗƛ²:∩J⌊∑
Ṗ # get all permutations
ƛ # map over them:
² # format as a square (returns a list of string …
4
votes
Is it a balanced number?
Vyxal, 4 bytes
YIṠ≈
Try it Online!
Beats all other answers.
How?
YIṠ≈
Y # Interleave the input with itself, giving a list with each digit duplicated
I # Split into two halves
Ṡ # Sum each …
1
vote
Calculate The Digit Sum
Ruby, 24 bytes
->a{a.sum{|x|x.to_i 19}}
Accepts an array of two strings.
Try it online!
3
votes
Find the weight of five apples
Haskell, 18 bytes
map=<<(-).(/4).sum
Attempt This Online!
1
vote
Find the weight of five apples
Ruby, 22 bytes
->a{a.map{a.sum/4-_1}}
Attempt This Online!
1
vote
Find the weight of five apples
05AB1E, 9 4 bytes
O4÷α
Try it online!
-5 bytes thanks to Kevin Cruijssen
2
votes
Find the weight of five apples
LOLCODE, 216 bytes
HOW IZ I f YR a
I HAS A s ITZ 0
IM IN YR l UPPIN YR i TIL BOTH SAEM i 5
s R SUM OF s a'Z SRS i
IM OUTTA YR l
IM IN YR l UPPIN YR i TIL BOTH SAEM i 5
VISIBLE DIFF OF QUOSHUNT OF s 4 …
1
vote
Find the weight of five apples
jq, 20 9 bytes
add/4-.[]
Attempt This Online!
-11 bytes thanks to @ovs
1
vote
Find the weight of five apples
J, 7 bytes
-~4%~+/
Attempt This Online!
5
votes
Find the weight of five apples
Vyxal, 9 7 6 5 bytes
∑4ḭ$-
Try it Online!
Explanation
∑4ḭ$-
# (implicit input)
∑ # Sum
4ḭ # Divide the sum by four
$- # Swap and subtract
-2 bytes thanks to a stone a …