#!/usr/bin/env python # coding: utf-8 # In[1]: from math import factorial s = 0 n = factorial(100) while n > 0: s += n % 10 n //= 10