New answers tagged

0 votes

Is this word in standard order?

Uiua SBCS, 3 bytes ≍⊛. Try it! Port of ovs' BQN answer.
chunes's user avatar
  • 23.4k
1 vote

Is it a valid ARM immediate value?

Jelly, 17 bytes +Ø%BḊṙ⁴ḶḤ¤;¬$ḄṂ<⁹ Try it online! A monadic link taking an integer and returning 1 for valid and two for invalid. Explanation ...
Nick Kennedy's user avatar
0 votes

Determine whether strings are anagrams

YASEPL, 77 bytes =1'=2'=c=e®1=f®2`1!g¥c,1=d=i`2!h¥d,2}7,g,3!i$`3!d+}2,f,2!i]4!c+}2,e>1|5`4>0`5 prompts you twice for both words, outputs either a one or zero ...
madeforlosers's user avatar
4 votes

Is it a valid ARM immediate value?

ARMv2, 32 28 bytes Input is in R0, output is in R1 which is zero if the input is an invalid constant. ...
Neil's user avatar
  • 169k
2 votes

Is it a valid ARM immediate value?

Ada/GNAT, 152 bytes ...
Devsman's user avatar
  • 137
1 vote

Are All the Items the Same?

YASEPL, 45 bytes =a=1'±comma=c®1=d¥0,1`1=e¥a,1}7,d,3!+}2,c`3!< input list as numbers seperated by commas (like ...
madeforlosers's user avatar
1 vote

Are All the Items the Same?

T-SQL 75 bytes declare @x table (y int) insert @x values... ...
Sam Cohen-Devries's user avatar
0 votes

Determine whether strings are anagrams

APL(NARS), 5 chars ≢⎕§⍦⎕ It return 0 if the two string are anagram each of other, or one number different of 0 otherwise. Test & how to use: ...
Rosario's user avatar
  • 271
2 votes

Is it a valid ARM immediate value?

05AB1E, 17 bytes 4B16°+¦2×30S12×åà Port of @Neil's Charcoal answer, so make sure to upvote that answer as well. Input as an integer. Try it online or verify all ...
Kevin Cruijssen's user avatar
4 votes

Is it a valid ARM immediate value?

Python, 52 bytes f=lambda n:n>4**32or 0<n%~-4**16>>8<8**8-1and f(n*4) Attempt This Online! Returns False for True and True for False. How? Uses <...
loopy walt's user avatar
  • 16.6k
12 votes

Is it a valid ARM immediate value?

Rust, 52 49 bytes |n|(0..16).any(|i|(n<<33^n<<32^n*2^n)<<i*2>>41<1) Attempt This Online! A closure that takes an unsigned 32-bit value ...
Bubbler's user avatar
  • 74.9k
2 votes

Is it a valid ARM immediate value?

Retina, 101 bytes .+ $.(23283064365386962890625** 16{`.+$ $.(4** )r`(.?)(.{1,32})$ $.($1*)¶$2 A`$ ¶ $ $` 0`0{12}|3{12} Try it online! Link includes test cases. ...
Neil's user avatar
  • 169k
2 votes

Is it a valid ARM immediate value?

JavaScript (Node.js), 43 bytes f=n=>++i&31&&n>>8==n>>31|f(n>>>2|n<<30);i=0 Try it online! Note: This function will not ...
tsh's user avatar
  • 34.3k
6 votes

Is it a valid ARM immediate value?

Charcoal, 21 bytes Nθ⊙ 3№×²◧⍘θ 123¹⁶×¹²ι Attempt This Online! Will accept input in decimal by default, but also hex with 0x ...
Neil's user avatar
  • 169k
1 vote

Is this number tetrahedral?

Rattle, 27 26 bytes |r`[=#-s+2*~*#/6[\=1q]]3`= Try it Online! Outputs 1 if the number is tetrahedral, 0 otherwise. Explanation ...
Daniel H.'s user avatar
  • 3,346
0 votes

Is this number tetrahedral?

YASEPL, 58 bytes !d'(=a`3!c$a+!b$a*c!c+!b*c/6}3,d,2!}1,d+|3`2>"Y"|4`1>"N"`4 requires input from stdin (it prompts you) and outputs a Y or ...
madeforlosers's user avatar
4 votes

Is it a valid ARM immediate value?

Go, 157 147 bytes ...
bigyihsuan's user avatar
  • 8,978
1 vote

Is it a valid ARM immediate value?

JavaScript (ES6), 47 bytes Returns 0 or 1. f=(n,m=~255)=>n&m&&~n&m?m%96&&f(n,m*4|m>>>30):1 Try it online! Commented ...
Arnauld's user avatar
  • 191k
2 votes

Are All the Items the Same?

Labyrinth, 14 bytes :,: " } =*$ @! Try it online! Takes input from stdin without any separators. Prints a negative integer if the items are equal, a positive ...
Bubbler's user avatar
  • 74.9k
1 vote

Integer Lists of Noah

AWK, 36 32 bytes ++_[$0]-2{i++}END{print NR/i==2} Try it online! -4 bytes, print value of NR/i==2 assessment instead of using ...
Marius_Couet's user avatar
0 votes

Determine whether strings are anagrams

Labyrinth, 23 bytes 1 ,:# * 0 1;/----+}=-!@ Try it online! Takes two words separated by a newline. For each word, computes the product of ...
Bubbler's user avatar
  • 74.9k
1 vote

Is this a powerful number?

Uiua SBCS, 8 bytes ∊1⊜⧻.°/× Try it! Swaps falsy and truthy
chunes's user avatar
  • 23.4k
0 votes

Is this number triangular?

Uiua, 14 bytes SBCS Outputs 0 for false and 1 for true. Uses the "8n+1 is Perfect Square" method. ...
Adelie's user avatar
  • 61
1 vote

Integer Lists of Noah

Awk, 44 bytes {++k[$0]}END{for(i in k)a=a||k[i]-2;print a} Try it online! 0 means it is a list of Noah, 1 means that it is not a list of Noah.
camelCasedSnivy's user avatar
1 vote

Integer Lists of Noah

Uiua, 8 bytes /×=2⊕⧻⊛. Test pad
Joao-3's user avatar
  • 1,021
0 votes

Busy Letters & Evil CEOs

Funge-98, 200 bytes ...
Alt Shift X's user avatar
0 votes

Busy Letters & Evil CEOs

Charcoal, 93 bytes FS⊞υ⌕αιF³⁰«≔⁰θFLυ«≔§υκη§≔υ⊕κ⁺§υ⊕κ∧¬η‹⊕κ⁺Lυθ≧⁺⁼η¹¹θ§≔υ⊖κ⁻§υ⊖κ∧⁼η²⁵›κ⁰≧﹪²⁶υ¿∧¬ⅈ№υ²³I⊕ι»UMυ§υ⁺λθ Try it online! Link is to verbose version of code. ...
Neil's user avatar
  • 169k
1 vote

Busy Letters & Evil CEOs

Python 3, 156 bytes An incredible 13-bytes reduction by @JonathanAllan: ...
enzo's user avatar
  • 1,941
1 vote

Busy Letters & Evil CEOs

Perl 5 -pa, 148 bytes ...
Xcali's user avatar
  • 14.2k
1 vote

Integer Lists of Noah

Perl 5 -pl, 31 bytes $k{$_}++}{$_=!grep$_-2,values%k Try it online!
Xcali's user avatar
  • 14.2k
1 vote

Integer Lists of Noah

Vyxal 3, 4 bytes SUu₌ Try it Online! Sort, uninterleave, uniquify, check if equal
pacman256's user avatar
  • 3,300
0 votes

Doubleouble Talkalk

Scala 3, 32 bytes s=>".+(.+)\\1$".r.findFirstIn(s) Attempt This Online!
138 Aspen's user avatar
  • 5,331
0 votes

Doubleouble Talkalk

Zsh, 57 bytes repeat $#1-2 {1=${1:1};eval '>${1//${1:0:'{2..$#1}'-1}}'} Attempt This Online! Outputs via exit code.
pxeger's user avatar
  • 23.5k
0 votes

Validate a codice fiscale

Charcoal, 50 bytes FS⊞υ⌕⁺α⭆χκι¬﹪⁻⊟υΣEυ⎇﹪κ²ι⌕᧔$⌈⊟⌈σEζ⊖)"⁷hY✂&⊕⧴C”ι²⁶ Try it online! Link is to verbose version of code. Outputs a Charcoal boolean, i.e. <...
Neil's user avatar
  • 169k
1 vote

Validate a codice fiscale

05AB1E, 36 32 bytes 25Ý•D+>∞¢-‹ ŸΔŒ•.IžKIkι`Šèì`(O₂Ö -4 bytes by porting @NickKennedy's Jelly answer. Input as a list of characters. Try it online or verify all ...
Kevin Cruijssen's user avatar
1 vote

Is my Graph Graceful?

Python3, 449 bytes ...
Ajax1234's user avatar
  • 6,893
1 vote

Doubleouble Talkalk

Python 3 with regex, 43 42 bytes import re f=re.compile(r'.+(.+)\1$').match Python3 port of the Javascript answer. Takes a string for input, returns a ...
movatica's user avatar
  • 1,025
1 vote

Doubleouble Talkalk

05AB1E, 9 bytes Three different alternatives: .œ3ùε¦Ë}à - Try it online or verify all test cases. .s¨ε2äË}à - Try it online or ...
Kevin Cruijssen's user avatar
0 votes

Doubleouble Talkalk

Python 3.8, 90 bytes The function takes as input a string s. It returns 0 for True cases, ...
SevC_10's user avatar
  • 418
0 votes

Validate a codice fiscale

Funge-98, 108 bytes "NRTS"4(I'0>'v00p <@.!-+A'g20w1p21-1:g21p20%'+g20+-fg3-+0'*'`9':\-+0'*'`9':  "$!#%('& Try it online! Contains non-...
Alt Shift X's user avatar
2 votes

Doubleouble Talkalk

Brachylog, 7 5 bytes -2 bytes thanks to Unrelated String ba₁ḍ= Try it online! Explanation ...
DLosc's user avatar
  • 38.4k
2 votes

Is this a powerful number?

Regex (ECMAScript or better), 50 bytes ^((?=(xx+?)\2+$)((?=\2+$)(?=(x+)(\4+$))\5){2,})*x$ Try it online! - ECMAScript Try it online! - Perl Try it online! - Java ...
Deadcode's user avatar
  • 11.6k
1 vote

Validate a codice fiscale

Perl 5 -pF, 137 bytes ...
Xcali's user avatar
  • 14.2k
1 vote

Validate a codice fiscale

APL+WIN, 161 bytes Prompts for string. ...
Graham's user avatar
  • 5,846
3 votes
Accepted

Validate a codice fiscale

Jelly, 33 31 bytes ØWiⱮịÐo“ÐVẈ÷{⁷.ƝİRḟ’Œ?¤’N0¦S26ḍ Try it online! A monadic link taking a string and returning 1 for valid and 0 for invalid. Explanation ...
Nick Kennedy's user avatar
1 vote

Validate a codice fiscale

Python 3, 165 159 bytes ...
enzo's user avatar
  • 1,941
0 votes

Doubleouble Talkalk

APL+WIN, 39 bytes Prompts for string. ×+/n=+/¨(n↑¨⊂v)=n↑¨(n←⍳⌊.5×⍴v)↓¨⊂v←⌽1↓⎕ Try it online! Thanks to Dyalog Classic
Graham's user avatar
  • 5,846
0 votes

Validate a codice fiscale

Excel ms365, 199 bytes Assuming input in A1: ...
JvdV's user avatar
  • 3,613
2 votes

Validate a codice fiscale

JavaScript (Node.js), 117 bytes f=([a,...x],s=i=0)=>x+x?f(x,s+g(++i%2?'BAFHJNPRTVCESULDGIMOQKWZYX'[g(a)]:a)):g(a)==s%26 g=x=>1/x?+x:parseInt(x,36)-10 Try it ...
l4m2's user avatar
  • 22.3k

Top 50 recent answers are included