fork download
  1. import java.util.{Calendar => C}
  2. object PronamaCal {
  3. def main(args:Array[String]) : Unit = {
  4. val cal = C.getInstance
  5. (Seq.fill((7 - (cal.get(C.DATE) % 7) + cal.get(C.DAY_OF_WEEK)) % 7)(" ")
  6. ++ (1 to cal.getActualMaximum(C.DATE))).map({
  7. case x : Int => " %2d ".format(x)
  8. case x => x
  9. }).grouped(7).map(x => ("" /: x)(_ + _)).foreach(println)
  10. }
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/opt/scala/bin/scalac: line 50: /dev/null: Permission denied
spoj: The program compiled successfully, but Main.class was not found.
      Class Main should contain method: def main(args: Array[String]).
stdout
Standard output is empty