Skip to content

Sum of digits from 1 to N #16

@benni515

Description

@benni515

http://www.geeksforgeeks.org/count-sum-of-digits-in-numbers-from-1-to-n/

This is a good algorithm so use for calculating the sum of digits from 1 to N
I tried implementing it but it did not work for a problem on Kattis.
https://open.kattis.com/problems/digitsum This is the Problem
I got TLE, so i added an unordered_map to know what has been calculated before, but that gave me WA

If anybody can implement this algorithm so it works, then please add the implementation to the Math folder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions