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

added 259 characters in body
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 10 bytes

ü‚vy`Så1åP

Try it online! or as a Test suite

Explanation

ü‚ # map pairing over each pair in input
 v # for each pair
 y` # push as 2 separate elements on stack
 Så # check each digit in 2nd number for membership in first
 1å # check if any 1 exists in the resulting list
 P # product of stack

05AB1E, 10 bytes

ü‚vy`Så1åP

Try it online!

Explanation

ü‚ # map pairing over each pair in input
 v # for each pair
 y` # push as 2 separate elements on stack
 Så # check each digit in 2nd number for membership in first
 1å # check if any 1 exists in the resulting list
 P # product of stack

05AB1E, 10 bytes

ü‚vy`Så1åP

Try it online! or as a Test suite

Explanation

ü‚ # map pairing over each pair in input
 v # for each pair
 y` # push as 2 separate elements on stack
 Så # check each digit in 2nd number for membership in first
 1å # check if any 1 exists in the resulting list
 P # product of stack
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 10 bytes

ü‚vy`Så1åP

Try it online!

Explanation

ü‚ # map pairing over each pair in input
 v # for each pair
 y` # push as 2 separate elements on stack
 Så # check each digit in 2nd number for membership in first
 1å # check if any 1 exists in the resulting list
 P # product of stack

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