Skip to main content
Commonmark migration
Source Link

#Jelly, 11 9 5 bytes

Jelly, 11 9 5 bytes

x2:ḊṂ

4 bytes removed thanks to Dennis!

Try it here.

###Explanation

Explanation

x2          Duplicate each element.
:Ḋ          Each element divided by the input with the first element removed,
            as integer, so there is a 0 only if some element in the duplicated
            list is less than the corresponding element in the other.
            There are also elements left unchanged, but it doesn't matter as
            the input is all positive.
Ṃ           Minimum in the list.

#Jelly, 11 9 5 bytes

x2:ḊṂ

4 bytes removed thanks to Dennis!

Try it here.

###Explanation

x2          Duplicate each element.
:Ḋ          Each element divided by the input with the first element removed,
            as integer, so there is a 0 only if some element in the duplicated
            list is less than the corresponding element in the other.
            There are also elements left unchanged, but it doesn't matter as
            the input is all positive.
Ṃ           Minimum in the list.

Jelly, 11 9 5 bytes

x2:ḊṂ

4 bytes removed thanks to Dennis!

Try it here.

Explanation

x2          Duplicate each element.
:Ḋ          Each element divided by the input with the first element removed,
            as integer, so there is a 0 only if some element in the duplicated
            list is less than the corresponding element in the other.
            There are also elements left unchanged, but it doesn't matter as
            the input is all positive.
Ṃ           Minimum in the list.
added 201 characters in body
Source Link
jimmy23013
  • 37k
  • 6
  • 77
  • 148

#Jelly, 11 99 5 bytes

x2ḣLṖ<ḊS¬x2:ḊṂ

Try it here. 4 bytes removed thanks to Dennis!

I need some tips...Try it here.

###Explanation

x2          Duplicate each element.
ḣL:Ḋ          FirstEach nelement elementsdivided whereby nthe isinput with the inputfirst length.element removed,
           Remove lastas integer, so there is a 0 only if some element. in the duplicated
<Ḋ          Each element <list theis inputless withthan the firstcorresponding element removedin the other.
          Check if There are also elements left unchanged, but it doesn't matter as
            the suminput is zeroall positive.
Ṃ           Minimum in the list.

#Jelly, 11 9 bytes

x2ḣLṖ<ḊS¬

Try it here.

I need some tips...

###Explanation

x2          Duplicate each element.
ḣL          First n elements where n is the input length.
           Remove last element.
<Ḋ          Each element < the input with the first element removed.
          Check if the sum is zero.

#Jelly, 11 9 5 bytes

x2:ḊṂ

4 bytes removed thanks to Dennis!

Try it here.

###Explanation

x2          Duplicate each element.
:Ḋ          Each element divided by the input with the first element removed,
            as integer, so there is a 0 only if some element in the duplicated
            list is less than the corresponding element in the other.
            There are also elements left unchanged, but it doesn't matter as
            the input is all positive.
Ṃ           Minimum in the list.
added 278 characters in body
Source Link
jimmy23013
  • 37k
  • 6
  • 77
  • 148

#Jelly, 11 9 bytes

x2ḣLṖ<ḊS¬

Try it here.

I need some tips...

###Explanation

x2          Duplicate each element.
ḣL          First n elements where n is the input length.
Ṗ           Remove last element.
<Ḋ          Each element < the input with the first element removed.
S¬          Check if the sum is zero.

#Jelly, 11 9 bytes

x2ḣLṖ<ḊS¬

Try it here.

I need some tips...

#Jelly, 11 9 bytes

x2ḣLṖ<ḊS¬

Try it here.

I need some tips...

###Explanation

x2          Duplicate each element.
ḣL          First n elements where n is the input length.
Ṗ           Remove last element.
<Ḋ          Each element < the input with the first element removed.
S¬          Check if the sum is zero.
Source Link
jimmy23013
  • 37k
  • 6
  • 77
  • 148
Loading