Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 2 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34

Ruby 2.7 -n, 4645 bytes

+1 to the idea of xash in his J's answer!

p %w[e to for si].any?{_1.chars& $_.chars&_1.chars==[]}

Try it online! Try it online!

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 -n, 46 bytes

+1 to the idea of xash in his J's answer!

p %w[e to for si].any?{_1.chars& $_.chars==[]}

Try it online!

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 -n, 45 bytes

+1 to the idea of xash in his J's answer!

p %w[e to for si].any?{$_.chars&_1.chars==[]}

Try it online!

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

added 394 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34

Ruby 2.7 -n, 46 bytes

+1 to the idea of xash in his J's answer!

p %w[e to for si].any?{_1.chars& $_.chars==[]}

Try it online!

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 -n, 46 bytes

+1 to the idea of xash in his J's answer!

p %w[e to for si].any?{_1.chars& $_.chars==[]}

Try it online!

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

deleted 3 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34

Ruby 2.7 with+ gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 with gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

Ruby 2.7 + gem install humanize, 61 bytes

require'humanize'
f=->v{(1..13).any?{_1.humanize.count(v)<1}}

gem-install-humanize-demo

Ruby 2.7 -n, (削除) 104 (削除ここまで) 90 bytes

Saved 10 bytes by removing duplicate chars from number names.

p %w[one two thre four five six sevn eight nie ten elvn twelv thiren].any?{_1.count($_)<1}

Try it online!

TIO uses an older version of Ruby, while in Ruby 2.7, we've numbered parameters, i.e., _1, which saves 2 bytes.

added 177 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34
Loading
added 177 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34
Loading
deleted 10 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34
Loading
added 106 characters in body
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34
Loading
Source Link
vrintle
  • 3k
  • 1
  • 14
  • 34
Loading

AltStyle によって変換されたページ (->オリジナル) /