You are viewing a single comment's thread. Return to all comments →
io.Source.stdin.getLines().drop(1).map(_.toLong).foreach{case n => println(((3*n*n - n)/2))}
Seems like cookies are disabled on this browser, please enable them to open this website
Pentagonal Numbers
You are viewing a single comment's thread. Return to all comments →