fork download
  1. $ cat 1.rb
  2. #!/usr/bin/env ruby
  3.  
  4. unixTime = Time.now.to_i
  5. chksum = 0
  6. start = Time.now
  7.  
  8. (0..10000000).each { |i| chksum += Time.at(unixTime + i).year }
  9.  
  10. total = Time.now - start
  11. puts "Total: #{total}"
  12. puts "Checksum: #{chksum}"
  13. $ ./1.rb
  14. Total: 11.06285
  15. Checksum: 20142139448
  16. $ java -cp joda-time-2.0.jar:. Main 3
  17. Total time: 143
  18. Checksum: 20142065600
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
$ cat 1.rb
^
Main.java:2: error: illegal character: \35
#!/usr/bin/env ruby
^
2 errors
stdout
Standard output is empty