Digit Sum Mod 9
Computer Mathematics
Medium
4 views
Problem Description
Given a big number as string, print its digit sum modulo 9.
Input Format
One line: digits string s.
Output Format
One integer 0-8.
Official Solution
Sum digits, take modulo 9 while adding to avoid big numbers.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!