VBScript, 177 bytes
Hey all, this is my very first CG post, and first attempt, so hope I followed all the rules...
Function L(s)
dim i,j,k,m,n
j = Len(s)
redim a(j)
n = 0
for i = 0 to j-1
A(i) = Mid(s,i+1,1)
m = m + s Mod A(i)
if j = 1 then
else
for k = 0 to i - 1
if A(i) = A(k) then n = n + 1
next
end if
next
if m + n = 0 then L = "y" else L = "n"
End Function
This can be run from Notepad by adding a line at the end
Msgbox L(InputBox(""))
And then saving it as .vbs, then double click.
Explanation:
Function L(s) 'creates the function "L" taking test number as input
dim i,j,k,t,m,n 'variables
j = Len(s) '"j" gets length of test number
redim a(j) 'creates array "a", size is length of test number
n = 0 'sets repeat character counter "n" to zero
for i = 0 to j-1 'for length of string
A(i) = Mid(s,i+1,1) 'each array slot gets one test number character
m = m + s Mod A(i) '"m" accumulates moduli as we test divisibility of each digit
if j = 1 then 'if test number is of length 1, it passes (do nothing)
else 'otherwise, gotta test for repeats
for k = 0 to i - 1 'for each digit already in array, test against current digit
if A(i) = A(k) then n = n + 1
'repeat char counter "n" stores no of repeats
next 'proceed through array looking for repeat
end if
next 'test next digit for divisibility and repeats
if m + n = 0 then L = "y" else L = "n"
'check for any repeats and moduli,
'then return yes or no for LynchBelledness
End Function
VBScript is a bit of blunt instrument for golfing, but hey, I haven't learned Ruby yet...