Problem 42413. Divisible by 11
Solution Stats
问题的评论s
-
3 Comments
Grant, your divisible series should become a challenge by its own right.
Thanks for the vote. We'll see if the Cody team agrees. I just added a few more problems to the series today to round it out.
好问题,看似棘手。
Solution Comments
-
2 Comments
my solution is failing because when the numbers are very large it gets confused by the "eXX" where XX is the exponent associated with the test number.
Can i get help on how to avoid this?
You need to find a way to operate on the string, which may involve mathematical operations on small portions of the string, bit by bit, converting small portions of the string to a number, in an iterative fashion, etc., based on the method you choose. str2num() is subject to loss of precision for very large numbers and will not work for at least one test case in essentially all of these problems (by design).
Problem Recent Solvers88
Suggested Problems
13018 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
2099 Solvers
Back to basics 11 - Max Integer
719 Solvers
678 Solvers
434 Solvers
More from this Author139
Problem Tags
社区寻宝
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!