fork download
  1. public class Hexspeak {
  2. public String decode(long ciphertext)
  3. {
  4. String ret = "";
  5. while(ciphertext > 0)
  6. {
  7. if(ciphertext % 16 == 0)
  8. ret = 'O' + ret;
  9. else if(ciphertext % 16 == 1)
  10. ret = 'I' + ret;
  11. else if(ciphertext % 16 > 9)
  12. ret = (char)(ciphertext % 16 - 10 + 'A') + ret;
  13. else
  14. return "Error!";
  15. ciphertext /= 16;
  16. }
  17. return ret;
  18. }
  19. }
  20.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class Hexspeak is public, should be declared in a file named Hexspeak.java
public class Hexspeak {
       ^
1 error
stdout
Standard output is empty