- All Contests
- ProjectEuler+
- Project Euler #172: Investigating numbers with few repeated digits
- Discussions

# Project Euler #172: Investigating numbers with few repeated digits

# Project Euler #172: Investigating numbers with few repeated digits

+ 2 comments Very confusing, what does he mean with 10^9 + 7 ?

+ 0 comments Cannot make my program work correctly and will move to another project. I think I made some mistakes on some assumption but cannot figure it out. But I did learn a lot from this project. Learn the Fermat's theorem and know how to calculate large modulus on exponential, factorials, and combinations. Lots of trick on how to squeeze the performance.

I used brutal force to get the following results, hope they are helpful for you.

k = 1 m = 0 0 k = 1 m = 1 9 k = 2 m = 0 0 k = 2 m = 1 81 k = 2 m = 2 90 k = 3 m = 0 0 k = 3 m = 1 648 k = 3 m = 2 891 k = 3 m = 3 900 k = 4 m = 0 0 k = 4 m = 1 4536 k = 4 m = 2 8667 k = 4 m = 3 8991 k = 4 m = 4 9000 k = 5 m = 0 0 k = 5 m = 1 27216 k = 5 m = 2 82296 k = 5 m = 3 89586 k = 5 m = 4 89991 k = 5 m = 5 90000 k = 6 m = 0 0 k = 6 m = 1 136080 k = 6 m = 2 758160 k = 6 m = 3 888570 k = 6 m = 4 899505 k = 6 m = 5 899991 k = 6 m = 6 900000 k = 7 m = 0 0 k = 7 m = 1 544320 k = 7 m = 2 6735960 k = 7 m = 3 8754480 k = 7 m = 4 8984115 k = 7 m = 5 8999424 k = 7 m = 6 8999991 k = 7 m = 7 9000000

+ 0 comments can multiple solution possible?

+ 3 comments I finally passed it after many many hours. I learned a ton. My answer involved generating functions, multiplication by fourier transforms and the Chinese remainder theorem.

+ 0 comments worked on given input values and on 3 1 7 if k>7. it shows runtime error. May be int long or size issue.. Any Advise.. how to deal with 10 power 5 numbers

Sort 31 Discussions, By:

Please Login in order to post a comment