output_description: Print the value \sum_{K=1}^N K\times f(K).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: from collections import defaultdict
  from functools import reduce
  
  n = int(input())
  
  
  def get_primes(n):
      primes = [2]
      lim = int(n**0.5)
      data = [i + 1 for i in range(2, n, 2)]
      while True:
          p = data[0]
          if lim < p:
              return primes + data
          primes.append(p)
          data = [e for e in data if e % p != 0]
  
  
  primes = get_primes(n)
  primes_set = set(primes)
  
  
  def divide(n):
      np = 0
      divider = defaultdict(int)
      while primes[np] <= n:
          p = primes[np]
          while n % p == 0:
              n //= p
              divider[p] += 1
          np += 1
      return divider
  
  
  result = 1
  for i in range(2, n + 1):
      if i in primes_set:
          result += i * 2
      else:
          div = divide(i)
          n_pat = reduce(lambda p, c: p * c, map(lambda v: v + 1, div.values()), 1)
          result += i * n_pat
  
  print(result)
  
problem_description: Statement
  
  For a positive integer X, let f(X) be the number of positive divisors of X.
  
  Given a positive integer N, find \sum_{K=1}^N K\times f(K).
samples: [{"input": "4", "output": "23\n    \n\nWe have f(1)=1, f(2)=2, f(3)=2, and f(4)=3, so the answer is 1\\times 1 +\n2\\times 2 + 3\\times 2 + 4\\times 3 =23.\n\n* * *"}, {"input": "100", "output": "26879\n    \n\n* * *"}, {"input": "10000000", "output": "838627288460105\n    \n\nWatch out for overflows."}]