Mathematica, (削除) 17 (削除ここまで) 14(削除) 14 (削除ここまで) 13 bytes / 12(削除) 12 (削除ここまで) 7 characters
Round[#⌊#/√2]&√2⌋&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
-1 byte, -5 characters, as per @Mark S. suggestedsuggestion, by using ⌊⌋.
⌊#/√2⌋&
to save 1For just one more byte and(but 5 more characters, but this no longer rounds) I can always round to the nearest integer, as it always rounds down. A similar program can be made to always round up. with
Round[#/√2]&
Mathematica, (削除) 17 (削除ここまで) 14 bytes / 12 characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
@Mark S. suggested
⌊#/√2⌋&
to save 1 byte and 5 characters, but this no longer rounds to the nearest integer, as it always rounds down. A similar program can be made to always round up.
Mathematica, (削除) 17 (削除ここまで) (削除) 14 (削除ここまで) 13 bytes / (削除) 12 (削除ここまで) 7 characters
⌊#/√2⌋&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
-1 byte, -5 characters, as per @Mark S. suggestion, by using ⌊⌋.
For just one more byte (but 5 more characters) I can always round to the nearest integer with
Round[#/√2]&
Mathematica, (削除) 17 (削除ここまで) 14 bytes / 12 characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
@Mark S. suggested
⌊#/√2⌋&
to save 1 byte and 5 characters, but this no longer rounds to the nearest integer, as it always rounds down. A similar program can be made to always round up.
Mathematica, (削除) 17 (削除ここまで) 14 bytes / 12 characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
Mathematica, (削除) 17 (削除ここまで) 14 bytes / 12 characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
@Mark S. suggested
⌊#/√2⌋&
to save 1 byte and 5 characters, but this no longer rounds to the nearest integer, as it always rounds down. A similar program can be made to always round up.
Mathematica, (削除) 17 (削除ここまで) 14 bytes (but/ 12 chars :'( )characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
Mathematica, (削除) 17 (削除ここまで) 14 bytes (but 12 chars :'( )
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
Mathematica, (削除) 17 (削除ここまで) 14 bytes / 12 characters
Round[#/√2]&
-3 bytes because Mathematica accepts the char √, which I copied from this MathGolf answer.
- 14.2k
- 1
- 62
- 117