All pastes #542000 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-05 18:05 UTC
rendered paste body
alias calc {
  var %x = 1, y = 1
  while (%x <= $0) {
    if ($strip($remove($+($,%x),$chr(44))) !isalpha) {
      var $+(%calc.,%x) = $+($,%x)
    }
    elseif ($right($+($,%x),1) == k) {
      var $+(%calc.,%x) = $calc($+($,%x)*1000)
      inc %x
    }
    elseif ($right($+($,%x),1) == m) {
      var $+(%calc.,%x) = $calc($+($,%x)*1000000)
      inc %x
    }
    elseif ($right($+($,%x),1) == b) {
      var $+(%calc.,%x) = $calc($+($,%x)*1000000000)
      inc %x
    }
  }