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 12 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 141135 bytes

Min@(s=Select)[(x@#~f~60-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2x=BlockMap[f=FromDigits,#,2]&

Try it online! Try it online!

-6 bytes from @att

Wolfram Language (Mathematica), 141 bytes

Min@(s=Select)[(x@#~f~60-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online!

Wolfram Language (Mathematica), 135 bytes

Min@(s=Select)[(x@#~f~60-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x=BlockMap[f=FromDigits,#,2]&

Try it online!

-6 bytes from @att

deleted 4 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 142141 bytes

Min@(s=Select)[(f[x@#,60]x@#~f~60-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online! Try it online!

Wolfram Language (Mathematica), 142 bytes

Min@(s=Select)[(f[x@#,60]-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online!

Wolfram Language (Mathematica), 141 bytes

Min@(s=Select)[(x@#~f~60-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online!

deleted 36 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 159142 bytes

Min@(s=Select)[(f[x@#,m=MixedRadix@{24,60}]60]-a~f~ma~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online! Try it online!

Wolfram Language (Mathematica), 159 bytes

Min@(s=Select)[(f[x@#,m=MixedRadix@{24,60}]-a~f~m)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online!

Wolfram Language (Mathematica), 142 bytes

Min@(s=Select)[(f[x@#,60]-a~f~60)&/@s[Permutations[p=#],(w=x@#;24>w[[1]]>=#&@@(a=x@p)&&w[[2]]<60)&],#>0&]&
x@n_:=(f=FromDigits)/@n~Partition~2

Try it online!

added 22 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading
deleted 5 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading
added 3 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading

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