Posts

Showing posts with the label pandigital prime

Pandigital prime | Project Euler | Problem #41

URL to the problem page:  https://projecteuler.net/problem=41 We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime. What is the largest n-digit pandigital prime that exists? #include   <iostream> using   namespace   std ; long   long   primecontrol ( long   long   a ) {      long   long  i, counter =  0 ;      for  (i =  2 ; i <=  sqrt (a); i++) {          if  (a % i ==  0 ) {             counter++;              break ;         }     }      if ...
My photo
Ercan Tomac
instagram.com/ercantomac