/*
* @title 提出IDの素数判定(手抜き)
* @description AtCoderやyukicoderなどの競技プログラミングのサイトにおける提出結果のページで、そのIDが素数ならば通知する
* @include http://*
* @license MIT License
* @require https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.9.1/math.min.js
* @require jquery
*/
var subPath = window.location.pathname.split("/");
var subID = parseInt(subPath[subPath.length - 1]);
if (isNaN(subID)) {
var msg = "Could not get the submission ID.";
} else if (math.isPrime(subID)) {
var msg = "Congratulations! #" + subID + " is prime!";
} else {
var msg = "Oops! #" + subID + " is not prime...";
}
window.alert(msg);