Skip to main content
deleted 14 characters in body
Source Link
C K
  • 121
  • 4

AWK, 3228 bytes

 {for(j=2;$0%j++;j=2;$0%j;j++);print j~i?1:0;}j~$0 

Try it online!Try it online!

AWK, 32 bytes

{for(j=2;$0%j++;);print j~i?1:0} 

Try it online!

AWK, 28 bytes

 {for(j=2;$0%j;j++);}j~$0 

Try it online!

Source Link
C K
  • 121
  • 4

AWK, 32 bytes

{for(j=2;$0%j++;);print j~i?1:0} 

Try it online!