Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

sum-of-digits

Sum of digits in C#

May 18, 2023 by Tarik

You could do it arithmetically, without using a string: sum = 0; while (n != 0) { sum += n % 10; n /= 10; }

Categories c# Tags algorithm, c++, sum-of-digits Leave a comment

Sum of digits of a factorial

May 4, 2023 by Tarik

I’m not sure who is still paying attention to this thread, but here goes anyway. First, in the official-looking linked version, it only has to be 1000 factorial, not 10000 factorial. Also, when this problem was reused in another programming contest, the time limit was 3 seconds, not 1 second. This makes a huge difference … Read more

Categories algorithm Tags algorithm, dynamic-programming, sum-of-digits Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa