Last active
April 9, 2018 10:25
-
-
Save idoushiki/7f91ec7f6ae6229fe23e30f2db698447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script> | |
max=6; | |
for(p=1;p<=max;p++){ | |
for(h=1;h<=max;h++){ | |
for(a=1;a<=max;a++){ | |
for(b=1;b<=max;b++){ | |
print(p,h,a,b); | |
} | |
} | |
} | |
} | |
function print(p,h,a,b){ | |
fl=0; | |
ka=(p**a)%h; | |
kb=(p**b)%h; | |
kka=(ka**b)%h; | |
kkb=(kb**a)%h; | |
br(); | |
document.write("ka="); | |
document.write(ka); | |
br(); | |
document.write("kb="); | |
document.write(kb); | |
br(); | |
if(kka!=kkb){ | |
document.write("no"); | |
exit; | |
} | |
else if(kka!=0&&kkb!=0){ | |
br(); | |
document.write(kka); | |
document.write(" "); | |
document.write(kkb); | |
br(); | |
} | |
} | |
function br(){ | |
document.write("<br>"); | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment