fork download
  1. object Flag extends App {
  2. var alpha = List[Int](150, 115, 160, 56, 153, 36, 222, 50, 172, 1, 3, 3, 7);
  3. var beta = List[Int](197, 56, 249, 21, 202, 103, 146, 115, 129, 55, 59, 48, 55);
  4.  
  5. print("> ");
  6. var input = scala.io.StdIn.readLine();
  7.  
  8. if (input.length != alpha.length) {
  9. println("Bad Input");
  10. System.exit(1);
  11. }
  12.  
  13. for (i <- 0 until alpha.length) {
  14. var c:Int = Character.codePointAt(input, i);
  15. if ((c ^ alpha(i)) != beta(i)) {
  16. println("Wrong flag!");
  17. System.exit(1);
  18. }
  19. }
  20.  
  21. println("WOOT! You Got It!")
  22. }
  23.  
  24. Flag.main(args);
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: ‘object’ does not name a type
 object Flag extends App {
 ^~~~~~
prog.cpp:24:1: error: ‘Flag’ does not name a type
 Flag.main(args);
 ^~~~
stdout
Standard output is empty