Problem 108838 · easy · Level 01 Prerequisites & Setup

Digits of a Three-Digit Number

input · integer division · modulo · f-strings

Read a three-digit whole number and print an equation that adds its digits, in the form <hundreds> + <tens> + <ones> = <sum>.

Examples

Input:  472
Output: 4 + 7 + 2 = 13
Input:  100
Output: 1 + 0 + 0 = 1

Constraints

  • 100 <= n <= 999

Goals

  • Extract individual digits with // and %
  • Print a small equation built from those digits
Starting Python…