Skip to content

A n-substring of a number is a substring of its digits that sum to n. For example, the 8-substrings of the number 352114 are: 352114 352114 352114 A number is called 8-substring-friendly if every one of its digits belongs to a 8-substring. For example, 352114 is 8-substring-friendly, but 26544 is not. For a given n, find T(n) the number of 8-sub…

License

Notifications You must be signed in to change notification settings

skbhardwaj/n-substring-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

n-substring-algorithm

A n-substring of a number is a substring of its digits that sum to n. For example, the 8-substrings of the number 352114 are:
(35)2114
3(521)14
35(2114)
A number is called 8-substring-friendly if every one of its digits belongs to a 8-substring. For example, 352114 is 8-substring-friendly, but 26(5)44 is not.

For a given n, find T(n) the number of 8-substring-friendly numbers from 1 to 10^n.

Demo!

About

A n-substring of a number is a substring of its digits that sum to n. For example, the 8-substrings of the number 352114 are: 352114 352114 352114 A number is called 8-substring-friendly if every one of its digits belongs to a 8-substring. For example, 352114 is 8-substring-friendly, but 26544 is not. For a given n, find T(n) the number of 8-sub…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published