CJam, (削除) 18 (削除ここまで) 15(削除) 15 (削除ここまで) 14 bytes
Saved 34 bytes thanks to Martin Ender
l~Afb2ew::l~Afb_1>.&:,:*
Explanation
l~ e# Read and eval the input
Afb e# Convert each number to a list of digits
2ew_ e# GetDuplicate allthe consecutivearray
pairs of lists 1> e# Slice it after the first element
::.& e# TakeVectorized set intersection; take the set intersection of eachcorresponding pair
e# elements of the two arrays
:, e# Get the length of each intersection
:* e# Take the product of the whole array.
e# Will be 0 if any intersection was empty.
CJam, (削除) 18 (削除ここまで) 15 bytes
Saved 3 bytes thanks to Martin Ender
l~Afb2ew::&:,:*
Explanation
l~ e# Read and eval the input
Afb e# Convert each number to a list of digits
2ew e# Get all consecutive pairs of lists
::& e# Take the set intersection of each pair
:, e# Get the length of each intersection
:* e# Take the product of the whole array.
e# Will be 0 if any intersection was empty.
CJam, (削除) 18 (削除ここまで) (削除) 15 (削除ここまで) 14 bytes
Saved 4 bytes thanks to Martin Ender
l~Afb_1>.&:,:*
Explanation
l~ e# Read and eval the input
Afb e# Convert each number to a list of digits
_ e# Duplicate the array
1> e# Slice it after the first element
.& e# Vectorized set intersection; take the set intersection of corresponding
e# elements of the two arrays
:, e# Get the length of each intersection
:* e# Take the product of the whole array.
e# Will be 0 if any intersection was empty.
CJam, 18(削除) 18 (削除ここまで) 15 bytes
Saved 3 bytes thanks to Martin Ender
l~Afb{_@&{;L}|}l~Afb2ew::&:,:*!!
Explanation
l~ e# Read and eval the input
Afb e# Convert each number to a list of digits
2ew e# Get all consecutive pairs of lists
::& e# Take the set intersection of each pair
:, e# Get the length of each intersection
:* e# Take the product of the whole array.
e# Will be 0 if any intersection was empty.
CJam, (削除) 18 (削除ここまで) 15 bytes
Saved 3 bytes thanks to Martin Ender
l~Afb2ew::&:,:*
Explanation
l~ e# Read and eval the input
Afb e# Convert each number to a list of digits
2ew e# Get all consecutive pairs of lists
::& e# Take the set intersection of each pair
:, e# Get the length of each intersection
:* e# Take the product of the whole array.
e# Will be 0 if any intersection was empty.