All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Sum of the Digits 2 (Posted on 2023-10-27) Difficulty: 3 of 5
Find sum of the digits of: 20232023

For example, the sum of digits of 216= 65536 is 6+5+5+3+6 =25

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution looking ahead | Comment 2 of 4 |
>> sod(sym(2023)^2023)
ans =
       30112
       
where sod is

function sd = sod(n0)
  sd=0;
  n1=char(string(n0));
  for i=1:length(n1)
   sd=sd+str2double(n1(i));
  end
end

as we're getting closer to the new year:

>> sod(sym(2023)^2024)
ans =
       30118
       
and

>> sod(sym(2024)^2024)
ans =
       29917

  Posted by Charlie on 2023-10-27 12:52:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information