><>, 24(削除) 24 (削除ここまで) 22 bytes
-2 bytes thanks to @Aaron
I'm trying a new language (since my Mathematica licence expired...)
01v>01\{=n;
1$<^!?(}!\1ドル+:{@*:*@{:+}(
Try it online, or at the fish playground
Assumes the input number is already on the stack, and returns 0 or 1. It works by multiplying together the first n numbers until that stops being less than the input, and then printing 1 if it equals the input, and 0 if it doesn't.
><>, 24 bytes
I'm trying a new language (since my Mathematica licence expired...)
01v>{=n;
1$<^!?(}:{:*@:+
Try it online, or at the fish playground
Assumes the input number is already on the stack, and returns 0 or 1. It works by multiplying together the first n numbers until that stops being less than the input, and then printing 1 if it equals the input, and 0 if it doesn't.
><>, (削除) 24 (削除ここまで) 22 bytes
-2 bytes thanks to @Aaron
I'm trying a new language (since my Mathematica licence expired...)
01\{=n;
?!\1ドル+:@*:{:}(
Try it online, or at the fish playground
Assumes the input number is already on the stack, and returns 0 or 1. It works by multiplying together the first n numbers until that stops being less than the input, and then printing 1 if it equals the input, and 0 if it doesn't.
><>, 24 bytes
I'm trying a new language (since my Mathematica licence expired...)
01v>{=n;
1$<^!?(}:{:*@:+
Try it online, or at the fish playground
Assumes the input number is already on the stack, and returns 0 or 1. It works by multiplying together the first n numbers until that stops being less than the input, and then printing 1 if it equals the input, and 0 if it doesn't.