Skip to content

Instantly share code, notes, and snippets.

@dnetguru
Last active June 16, 2016 13:09
Show Gist options
  • Save dnetguru/cf2d3b76dae5286c283d to your computer and use it in GitHub Desktop.
Save dnetguru/cf2d3b76dae5286c283d to your computer and use it in GitHub Desktop.
LVL30: Image analysis helper
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script>
function gcd_rec(a, b) {
if (b) {
return gcd_rec(b, a % b);
} else {
return Math.abs(a);
}
}
var mul = 0;
function render(){
for (i = 100154 + (308 * mul) + ((mul) * 49); i < 100154 + (308 * mul) + ((mul + 1) * 49); i++)
{
if (gcd_rec(i, 210)==1) {
document.write(
'\t <img title="'+ i +'" src="https://hax.tor.hu/level30/?gen=1&pw=' + i + '">\t' +
'<br>');
}
}
document.write("<input type='button' value='Next Set' onclick='wow()'><br/>")
}
render();
function wow()
{
mul++;
document.body.innerHTML = '';
render();
}
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment