Find the last non-zero digit in a primorial - MATLAB Cody - MATLAB Central

Problem 46057. Find the last non-zero digit in a primorial

Difficulty:Rate
Cody Problem 45251 asked us to find the last non-zero digit in a factorial. For this problem consider the primorial p_n#, the product of primes up to and including the nth prime p_n. For example, for n = 12, the primorial is 7420738134810, whose last non-zero digit is 1.
Find the last non-zero digit in the primorial p_n#.
See also Cody Problems 46054 "Count trailing zeros in a primorial" and 46060 "Identify primorial primes".

Solution Stats

31.82% Correct | 68.18% Incorrect
Last Solution submitted on Sep 08, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
18
8

Problem Recent Solvers16

Suggested Problems

More from this Author291

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page