Ad
Algorithms
Logic
Code
Diff
  • def lostPencils(end):    
        return (end+1)*(end/2)
    • def lostPencils(end):
    • result = 0
    • current = 1
    • while current <= end:
    • result += current
    • current += 1
    • return result
    • def lostPencils(end):
    • return (end+1)*(end/2)