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 76 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, (削除) 56 (削除ここまで) 54(削除) 54 (削除ここまで) 52 bytes

Edit: -24 bytes thanks to pajonk

function(n,i){while(n<-n-(i==!(!T%%3)+2*-i+2*!T%%5))T=T+1;T}

Try it online! Try it online!

This really (still...) seems to have too many parentheses... (削除) This really seems to have too many parentheses... (削除ここまで)
Edit: but one pair lessThis is really pajonk's answer, now (thanks: pajonk), after removing all the useless parentheses that I left in the original...

R, (削除) 56 (削除ここまで) 54 bytes

Edit: -2 bytes thanks to pajonk

function(n,i){while(n<-n-(i==(!T%%3)+2*!T%%5))T=T+1;T}

Try it online!

This really (still...) seems to have too many parentheses... Edit: but one pair less now (thanks: pajonk).

R, (削除) 56 (削除ここまで) (削除) 54 (削除ここまで) 52 bytes

Edit: -4 bytes thanks to pajonk

function(n,i){while(n<-n-!(!T%%3)-i+2*!T%%5)T=T+1;T}

Try it online!

(削除) This really seems to have too many parentheses... (削除ここまで)
Edit: This is really pajonk's answer, now, after removing all the useless parentheses that I left in the original...

added 104 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, 56(削除) 56 (削除ここまで) 54 bytes

Edit: -2 bytes thanks to pajonk

function(n,i){while(n<-n-(i==(!T%%3)+2*(!T%%5)==i))T=T+1;T}

Try it online! Try it online!

This really (still...) seems to have too many parentheses...Edit: but one pair less now (thanks: pajonk).

R, 56 bytes

function(n,i){while(n<-n-((!T%%3)+2*(!T%%5)==i))T=T+1;T}

Try it online!

This really seems to have too many parentheses...

R, (削除) 56 (削除ここまで) 54 bytes

Edit: -2 bytes thanks to pajonk

function(n,i){while(n<-n-(i==(!T%%3)+2*!T%%5))T=T+1;T}

Try it online!

This really (still...) seems to have too many parentheses...Edit: but one pair less now (thanks: pajonk).

Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, 56 bytes

function(n,i){while(n<-n-((!T%%3)+2*(!T%%5)==i))T=T+1;T}

Try it online!

This really seems to have too many parentheses...

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