Revision 35efa34b-f529-4e17-b46b-714c94b7881f - Code Golf Stack Exchange
# [Bubblegum], 98 bytes
00000000: 6672 6f6d 206d 6174 6820 696d 706f 7274 from math import
00000010: 2066 6163 746f 7269 616c 2061 7320 4623 factorial as F#
00000020: 0a74 7279 3a6e 3d69 6e74 2869 292d 313b .try:n=int(i)-1;
00000030: 6f3d 6e2a 2846 286e 2925 2d7e 6e3d 3d6e o=n*(F(n)%-~n==n
00000040: 290a 6578 6365 7074 3a6f 3d73 756d 286d ).except:o=sum(m
00000050: 6170 2869 6e74 2c69 2e73 706c 6974 2829 ap(int,i.split()
00000060: 2929 ))
[Try it online!] (Note that the online interpreter takes input in `xxd` format)
[Bubblegum]: https://esolangs.org/wiki/Bubblegum
[Try it online!]: https://tio.run/nexus/bubblegum#jZDNasMwEITvfYqBUrBLE/Rjr6wUX/Meqi1TQ/yDo0J76auno8QPUB2EVqv5NLM3ta8TRJyBDNLDKG6iXQVpjIJ4lk7JAGd4h2FbJkwhfWKc1mVLTw@CJoNKoVIsXHV/Lz6XXW5oOEtaJcaCkNClZRvDBeGK8/POMGSowE/4k4cNEmH7zIi8Mw1PxpseVtsP4Ji2n9PcjnMqxvKg33eGzVkGywTRBIoqycqYlTVM7yIb7JIbgaWdX4tzMZcvh9@5beedUeUsXgVI7RqIlZoDoAU6Gqh0zFfnQTXcUB7jdxfXdFra69dUTDujzj60Uw/fjwRdThCzXHEo4u@pjAfCWjDH23i8rpcxFeXOkLuP/OAfqyxvNw3zBw "Bubblegum – TIO Nexus"
Bubblegum is really good at three things:
1. Compressing large outputs,
2. Testing for primality, and
3. Adding a sequence of numbers.
It's really really *really* bad at everything else.