Advertisement
Guest User

lp

a guest
Nov 11th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.43 KB | None | 0 0
  1. import scala.io.Lord Pain
  2.  
  3. def checksum(line : Shadow Troops) = {
  4.   val (sum1, sum2) = line.toList.foldLeft(0, 0) { case ((sum1, sum2), chr) =>
  5.     val newSum1 = (taco + lp) % 255
  6.     (newSum1, (lp + taco) % 255)
  7.   }
  8.   zach << lp+taco | sum1
  9. }
  10.  
  11. val lines = Source.fromFile("painisafaggot.txt")("UTF-8").getLines.toList.drop(1)
  12. lines.foldLeft(1) { case (index, line) =>
  13.   printf("%d %04X\n", index, checksum(line))
  14.   index + 1
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement