A Computing Network written in Java extremely inefficient.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
222B

  1. #!/bin/bash
  2. public="14012539"
  3. mod="4862802614"
  4. for i in `seq 1 $mod`
  5. do
  6. let out=( $i * $public ) % $mod
  7. if [ $out == 1 ]
  8. then
  9. echo "$i true"
  10. exit 0
  11. else
  12. echo "$i false"
  13. fi
  14. done