You are viewing a single comment's thread. Return to all comments →
And people keep asking me why I prefer scala over java ;-) Its actually the whole program, not only the part inside main ;-)
object Solution { def main(args: Array[String]) = println((1 to readLine.toInt).map { _ => val s = readLine; val c = s.length - 1 (if((0 to s.length/2).forall(i => math.abs(s(i)-s(i+1)) == math.abs(s(c-i)-s(c-i-1)))) "" else "Not ") + "Funny" }.mkString("\n")) }
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →
And people keep asking me why I prefer scala over java ;-) Its actually the whole program, not only the part inside main ;-)