Skip to content

Latest commit

 

History

History

micro-optimization-digit-sum

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
  • Completed at: 2023-01-09T03:40:35.753Z

  • Completed languages: ruby

  • Tags: Fundamentals

  • Rank: 6 kyu

Description

You wrote a program that can calculate the sum of all the digits of a non-negative integer.

However, it's not fast enough. Can you make it faster?


Input size

Haskell:
- 50 random tests of `n <= 2^64`
- 50 random tests of `n <= 2^200000`
Python:
- 50 random tests of `n <= 2^64`
- 50 random tests of `n <= 2^120000`
Ruby:
- 50 random tests of `n <= 2^64`
- 50 random tests of `n <= 2^100000`