Submission details
Task:Backpacking
Sender:aalto26am_033
Submission time:2026-08-31 16:58:17 +0300
Language:Scala
Status:COMPILE ERROR

Compiler report

input/Week1.scala:8: error: expected class or object definition
def Backpacking(A:Int,B:Int): Int = A+B
^
one error found

Code

object Sum {
    def main(args: Array[String]): Unit = {
        val Array(a,b) = readLine.split(" ").map(_.toInt)
        println(Backpacking(a,b))
    }
}

def Backpacking(A:Int,B:Int): Int = A+B
/*
def StoneGame(A:Int, B:Int,res: Boolean): String =
  if A > B then return StoneGame(B,A,res)
  if A == 2 && B > 1 then
    !res
  if A == 1 && B > 1 then
    res
  else if A == 1 && B == 1 then
    !res
  else if A == 0 && B == 1 then
    res
  else if A == 0 && B == 0 then
    !res
end StoneGame
 */