Integer division and remainder




Task
Time limit: 1000 ms,
Memory limit: 32 Mb

Write a program that finds the sum of the squares of the digits of a given number from the initial five-digit number

Example
N Input Output
1 12345 55

(1*1 + 2*2 + 3*3 + 4*4 + 5*5 = 55)

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: