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

Commonmark migration
Source Link

#R, (削除) 72 67 (削除ここまで) 29 bytes

R, (削除) 72 67 (削除ここまで) 29 bytes

Edit: Thanks to @rturnbull for shaving off two bytes.

n=scan();`if`(n%%9|!n,n%%9,9)

#R, (削除) 72 67 (削除ここまで) 29 bytes

Edit: Thanks to @rturnbull for shaving off two bytes.

n=scan();`if`(n%%9|!n,n%%9,9)

R, (削除) 72 67 (削除ここまで) 29 bytes

Edit: Thanks to @rturnbull for shaving off two bytes.

n=scan();`if`(n%%9|!n,n%%9,9)
deleted 87 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16

#R, (削除) 72 67 (削除ここまで) 3129 bytes

First answer produces erroneous results dueEdit: Thanks to floating point precision issues in R@rturnbull for shaving off two bytes.

n=scan();ifelse;`if`(n%%9|!n,n%%9,9)

#R, (削除) 72 67 (削除ここまで) 31 bytes

First answer produces erroneous results due to floating point precision issues in R.

n=scan();ifelse(n%%9|!n,n%%9,9)

#R, (削除) 72 67 (削除ここまで) 29 bytes

Edit: Thanks to @rturnbull for shaving off two bytes.

n=scan();`if`(n%%9|!n,n%%9,9)
deleted 8 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16

#R, (削除) 72 67 (削除ここまで) 3931 bytes

First answer produces erroneous results due to floating point precision issues in R.

n=scan();if;ifelse(n%%9|!n)ifelse(n%%9,n%%9,9)else 0

#R, (削除) 72 67 (削除ここまで) 39 bytes

First answer produces erroneous results due to floating point precision issues in R.

n=scan();if(n)ifelse(n%%9,n%%9,9)else 0

#R, (削除) 72 67 (削除ここまで) 31 bytes

First answer produces erroneous results due to floating point precision issues in R.

n=scan();ifelse(n%%9|!n,n%%9,9)
added 33 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16
Loading
added 17 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16
Loading
added 17 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16
Loading
Source Link
Billywob
  • 3.5k
  • 13
  • 16
Loading

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