fork download
  1. javascriptcode="""
  2. function gcd(a,b) {
  3. if (a == b){
  4. return a;
  5. }
  6. if (a > b){
  7. return gcd(a-b,b);
  8. }
  9. if (a < b){
  10. return gcd(a, b-a);
  11. }
  12. }
  13.  
  14. write( gcd(24,8) == 8 );
  15. write(" ");
  16. write( gcd(1362, 1407) ); // Empress Xu (Ming Dynasty) wrote biographies
  17. write(" ");
  18. write( gcd(1875, 1907) ); // Qiu Jin, feminist, revolutionary, and writer
  19. write(" ");
  20. write( gcd(45,116) ); // Ban Zhao, first known female Chinese historian
  21. """
Runtime error #stdin #stdout 0.26s 213120KB
stdin
Standard input is empty
stdout
Standard output is empty