Run following command on your terminal:
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O FILENAME| static boolean isValid(String value) { | |
| try { new java.math.BigInteger(value); } | |
| catch (Exception e) { return false; } | |
| return true; | |
| } |
| /* | |
| * Solution of Joshphus Problem using Bitwise Operation | |
| * Wikipedia: https://en.wikipedia.org/wiki/Josephus_problem | |
| * YouTube: https://www.youtube.com/watch?v=uCsD3ZGzMgE | |
| * | |
| * ====================== EXPLANATION ====================== | |
| * | |
| * n (41) the number of people standing in the circle | |
| * n = 101001 | |
| * |
| /* | |
| * Solution of Josephus Problem using Bitwise Operation | |
| * Shifting the most-significant set bit of n to the | |
| * least significant bit will return the safe position. | |
| * | |
| * ====================== EXPLANATION ====================== | |
| * | |
| * n (41) the number of people standing in the circle | |
| * n = 101001 | |
| * |
Use this command:
sudo systemctl stop [email protected]