Post History
Python 3, 98 bytes print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()").replace("j","i")) Try it online! Since the input format is restrictive, I may as well just...
Answer
#2: Post edited
# [Python 3], 81 bytes- <!-- language-all: lang-python -->
print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()"))[Try it online!][TIO-kqik3f9u]- [Python 3]: https://docs.python.org/3/
[TIO-kqik3f9u]: https://tio.run/##TctBCoAgEEbhq8S/mskS0hNJCE2IDWZBpzfbtXwfPH3qdmTfmhbJlc5aKN4hEQhGsl6V2JaoKayRMGACj4QfSacdbMBgtn0X7e8XrS3GyeBmLy8 "Python 3 – Try It Online"- Since the input format is restrictive, I may as well just spam replace and abuse `eval`.
- # [Python 3], 98 bytes
- <!-- language-all: lang-python -->
- print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()").replace("j","i"))
- [Try it online!][TIO-kqztj0rq]
- [Python 3]: https://docs.python.org/3/
- [TIO-kqztj0rq]: https://tio.run/##TYtNCoAgEEavIt9qJiuoTiQhNBI2mAWd3mbp9v3oV48rb61pkVzproXiG04CwUvWpxLPJeoZ9khwGMEDoUNiKIE9GMyz7aL2cp8kS8Rsa4tfxa3TJj8 "Python 3 – Try It Online"
- Since the input format is restrictive, I may as well just spam replace and abuse `eval`.
#1: Initial revision
# [Python 3], 81 bytes <!-- language-all: lang-python --> print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()")) [Try it online!][TIO-kqik3f9u] [Python 3]: https://docs.python.org/3/ [TIO-kqik3f9u]: https://tio.run/##TctBCoAgEEbhq8S/mskS0hNJCE2IDWZBpzfbtXwfPH3qdmTfmhbJlc5aKN4hEQhGsl6V2JaoKayRMGACj4QfSacdbMBgtn0X7e8XrS3GyeBmLy8 "Python 3 – Try It Online" Since the input format is restrictive, I may as well just spam replace and abuse `eval`.