Divisible By 8 From Last Three Digits
Computer Mathematics
Medium
3 views
Problem Description
Given a decimal string s, decide if it represents a number divisible by 8.
Input Format
One line: string s (digits).
Official Solution
If length<=3 parse whole number, else parse last three digits. If %8==0 YES else NO.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!