Post History
PHP, 69 37 bytes <?=($y=sqrt($x=fgets(STDIN)))*$y==$x; Try it online! Golfed 32 bytes thanks to @Shaggy's advice.
Answer
#4: Post edited
# [PHP], 69 bytes- <!-- language-all: lang-php -->
<?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}[Try it online!][TIO-ktfq3wel]- [PHP]: https://php.net/
[TIO-ktfq3wel]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNf@/29mDAA "PHP – Try It Online"
- # [PHP], <s>69</s> 37 bytes
- <!-- language-all: lang-php -->
- <?=($y=sqrt($x=fgets(STDIN)))*$y==$x;
- [Try it online!][TIO-ktk01a0x]
- Golfed 32 bytes thanks to [**@Shaggy**](https://codegolf.codidact.com/users/53588)'s [advice](https://codegolf.codidact.com/comments/thread/4491#comment-13584).
- [PHP]: https://php.net/
- [TIO-ktk01a0x]: https://tio.run/##K8go@P/fxt5WQ6XStriwqERDpcI2LT21pFgjOMTF009TU1MLKGOrUmH9/78lAA "PHP – Try It Online"
#3: Post edited
# [PHP], <s>69</s> 56 bytes- <!-- language-all: lang-php -->
- <?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}
- [Try it online!][TIO-ktfq3wel]
Golfed 13 bytes because it was specified that nothing can be printed on one end of the condition, as long as the other has output. I know, I know. Abuse, hehe.- [PHP]: https://php.net/
- [TIO-ktfq3wel]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNf@/29mDAA "PHP – Try It Online"
- # [PHP], 69 bytes
- <!-- language-all: lang-php -->
- <?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}
- [Try it online!][TIO-ktfq3wel]
- [PHP]: https://php.net/
- [TIO-ktfq3wel]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNf@/29mDAA "PHP – Try It Online"
#2: Post edited
# [PHP], 69 bytes- <!-- language-all: lang-php -->
<?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}else{echo 1;}[Try it online!][TIO-ktfhlo4g]- [PHP]: https://php.net/
[TIO-ktfhlo4g]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNem5hSnQjiG1rX//5sZAwA "PHP – Try It Online"
- # [PHP], <s>69</s> 56 bytes
- <!-- language-all: lang-php -->
- <?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}
- [Try it online!][TIO-ktfq3wel]
- Golfed 13 bytes because it was specified that nothing can be printed on one end of the condition, as long as the other has output. I know, I know. Abuse, hehe.
- [PHP]: https://php.net/
- [TIO-ktfq3wel]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNf@/29mDAA "PHP – Try It Online"
#1: Initial revision
# [PHP], 69 bytes <!-- language-all: lang-php --> <?php $x=fgets(STDIN);$y=sqrt($x);if($y*$y==$x){echo 0;}else{echo 1;} [Try it online!][TIO-ktfhlo4g] [PHP]: https://php.net/ [TIO-ktfhlo4g]: https://tio.run/##K8go@P/fxr4go0BBpcI2LT21pFgjOMTF00/TWqXStriwqERDpULTOjNNQ6VSCyhiC@RVpyZn5CsYWNem5hSnQjiG1rX//5sZAwA "PHP – Try It Online"