Looking for an inspiration? Below you will find public programs submitted by other users.

Filter by: All Bash C C# C++ 4.8.1 C++11 Haskell Java Java7 Objective-C Pascal (fpc) Pascal (gpc) Perl PHP Python Python 3 Ruby SQL VB.NET Ada Assembler Assembler AWK (gawk) AWK (mawk) bc Brainf**k C++ 4.3.2 C99 strict CLIPS Clojure COBOL COBOL 85 Common Lisp (clisp) D (dmd) Erlang F# Factor Falcon Forth Fortran Go Groovy Icon Intercal JavaScript (rhino) JavaScript (spidermonkey) Lua Nemerle Nice Nimrod Node.js Ocaml Octave Oz PARI/GP Perl 6 Pike Prolog (gnu) Prolog (swi) R Scala Scheme (guile) Smalltalk Tcl Text Unlambda Whitespace

#rV8dgv Scala 1 minute ago
Success
  1. object Main extends App {
  2.  
  3.  
  4. trait someTrait {
  5.  
  6.  
  7. type T;
  8.  
  9. def some(t: T) = new someTrait {
#RbvNNv Scala 25 minutes ago
Success
  1. object Main extends App {
  2. println("drzewo5".hashCode)
  3. }
#pV20bw Scala 38 minutes ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. println(fib(0, 1) takeWhile {_ < 4000000} filter {_ % 2 == 0} sum)
  4. }
  5.  
  6. def fib(x1: Int, x2: Int): Stream[Int] = {
  7. x1 #:: fib(x2, x1 + x2)
  8. }
  9. }
#d6YgL8 Scala 40 minutes ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. fib(0, 1) takeWhile {_ < 4000000} filter {_ % 2 == 0} sum
  4. }
  5.  
  6. def fib(x1: Int, x2: Int): Stream[Int] = {
  7. x1 #:: fib(x2, x1 + x2)
  8. }
  9. }
#MYPm7P Scala 42 minutes ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. println("Hello, world!")
  4. }
  5.  
  6. def fib(x1: Int, x2: Int): Stream[Int] = {
  7. x1 #:: fib(x2, x1 + x2)
  8. }
  9. }
#tnWQHm Scala 2 hours ago
Success
  1. object Main extends App {
  2. class Foo {
  3. class Bar { // non-private inner class
  4. def someSecretMethod = "I've got ya!"
  5. }
  6. }
  7.  
  8. val foo = new Foo
  9. val wrong = (new foo.Bar).someSecretMethod
#CAysjv Scala 2 hours ago
Compilation error
  1. class Foo {
  2. class Bar { // non-private inner class
  3. def someSecretMethod = "I've got ya!"
  4. }
  5. }
  6.  
  7. val foo = new Foo
  8. val wrong = (new foo.Bar).someSecretMethod
#Lj0PlF Scala 2 hours ago
Compilation error
  1. object Main extends App {
  2. class Foo {
  3. class Bar { // non-private inner class
  4. def someSecretMethod = "I've got ya!"
  5. }
  6. }
  7.  
  8. val wrong = new Foo.Bar.someSecretMethod
  9. }
#2qBmNM Scala 3 hours ago
Success
  1. object Main extends App {
  2.  
  3. case class Address(street: String, city: String, zipcode: String)
  4. case class Person(name: String, address: Address)
  5. case class Account(owner: Person, entries: List[Int])
  6.  
  7. def balance(a: Account) = a.entries.sum
  8.  
  9. trait Sum[A] {
#jeJ49T Scala 3 hours ago
Success
  1. object Main extends App {
  2. case class Address(street: String, city: String, zipcode: String)
  3. case class Person(name: String, address: Address)
  4. case class Account(owner: Person, entries: List[Int])
  5.  
  6. def balance(a: Account) = a.entries.sum
  7.  
  8. trait Sum[A] {
  9. def sum(a: A): Int
#yYOyqE Scala 3 hours ago
Compilation error
  1. case class Address(street: String, city: String, zipcode: String)
  2. case class Person(name: String, address: Address)
  3. case class Account(owner: Person, entries: List[Int])
  4.  
  5. def balance(a: Account) = a.entries.sum
  6.  
  7. trait Sum[A] {
  8. def sum(a: A): Int
  9. }
#DZD4jb Scala 3 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. }
#iKiHLB Scala 4 hours ago
Compilation error
  1. object Main extends App {
  2.  
  3. if ("sdfsdfsdf") {
  4.  
  5. print("prawda")
  6.  
  7. }
  8.  
  9. }
#H5yAxz Scala 4 hours ago
Success
  1. object Main extends App {
  2.  
  3. var a = 6
  4.  
  5. if (a == 6) {
  6.  
  7. print("prawda")
  8.  
  9. }
#Fih2Yi Scala 4 hours ago
Success
  1. import java.io.{ BufferedReader, InputStreamReader, FilterInputStream, FilterOutputStream }
  2.  
  3. object Main extends App {
  4.  
  5. var a = 6
  6.  
  7. if (a == 6) {
  8.  
  9. print("prawda")
#WI4z5g Scala 4 hours ago
Compilation error
  1. object Main extends App {
  2.  
  3. if("asdfsafsd") {
  4.  
  5. out.write("prawda")(Codec.UTF8)
  6.  
  7. }
  8.  
  9. }
#bLMB97 Scala 5 hours ago
Success
  1. object Main extends App {
  2. val l: List[Any] = List("Yes")
  3.  
  4. l match {
  5. case x: List[Int] => print(x.getClass.getName)
  6. case _ => print("Could not match")
  7. }
  8. }
#lbck0A Scala 6 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. }
#zDYpmi Scala 8 hours ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. println("Hello, World!");
  4. }
  5. }
#pIuZjW Scala 12 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. val pat = """[0-9]+\.([0-9]+|0e-?[0-9]+)|[0-9]+e-?[0-9]+""".r
  4. println(pat.findFirstIn("3e343 0.123").toList)
  5. }
#gfhAJu Scala 13 hours ago
Compilation error
  1. object Solution {
  2.  
  3. def main(args: Array[String]) {
  4. /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution
  5. */
  6.  
  7. import scala.io._
  8.  
  9. val n: Int = StdIn.readLine.toInt
#OCybzk Scala 18 hours ago
Success
  1. object Main extends App {
  2. def fib(n: Int): Int = if (n <= 1) n else fib(n-1) + fib(n-2)
  3.  
  4. println(fib(7))
  5. }
#5JSGTM Scala 21 hours ago
Success
  1. object Main extends App {
  2. val l: List[Any] = List("Yes")
  3.  
  4. l match {
  5. case x: List[Int] => print(x.toString)
  6. case _ => print("Could not match")
  7. }
  8. }
#PDPGem Scala 21 hours ago
Success
  1. object Main extends App {
  2. println(1 + 1)
  3. }
#Nqmbs9 Scala 1 day ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. }
#9ShI1G Scala 1 day ago
Success
  1. import scala.util.parsing.input._
  2. import scala.util.parsing.combinator._
  3.  
  4. object Main extends App with Parsers with RegexParsers {
  5. override def skipWhitespace = false
  6.  
  7. val pair = for (
  8. name <- """[^:]+""".r;
  9. _ <- """:\s*""".r;
#dRupHX Scala 1 day ago
Compilation error
  1. import scala.util.parsing.input._
  2. import scala.util.parsing.combinator._
  3.  
  4. object Main extends App with Parsers with RegexParsers {
  5. override def skipWhitespace = false
  6.  
  7. val pair = for (
  8. name <- """[^:]+""".r;
  9. _ <- """:\s*""".r;
#UcgE4x Scala 1 day ago
Compilation error
  1. import scala.util.parsing.input._
  2. import scala.util.parsing.combinator._
  3.  
  4. object Main extends App with Parsers with RegexParsers {
  5. override def skipWhitespace = false
  6.  
  7. val pair = for (
  8. name <- """[^:]+""".r;
  9. _ <- """:\s*""".r;
#eff1D9 Scala 1 day ago
Compilation error
  1. import scala.util.parsing.input._
  2. import scala.util.parsing.combinator._
  3.  
  4. object Main extends App with Parsers with RegexParsers {
  5. override def skipWhitespace = false
  6.  
  7. val pair = for (
  8. name <- """[^:]+""".r;
  9. _ <- """:\s*""".r;
#pmEfjv Scala 1 day ago
Success
  1. import scala.util.parsing.input._
  2. import scala.util.parsing.combinator._
  3.  
  4. object Main extends App with Parsers with RegexParsers {
  5. override def skipWhitespace = false
  6.  
  7. val pair = for (
  8. name <- """[^:]+""".r;
  9. _ <- """:\s*""".r;