Add comments

Added comments to all the python solutions implemented so far.
This commit is contained in:
2019-09-26 15:57:04 +02:00
parent dfb13c083b
commit 3503357703
29 changed files with 459 additions and 71 deletions

View File

@ -17,7 +17,7 @@ int compare(void *a, void *b);
int main(int argc, char **argv)
{
int a, b, i, j, p, sum, n = 0, num;
int i, j, p, sum, n = 0, num;
int **products;
char num_s[10];
double elapsed;

View File

@ -88,7 +88,7 @@ int is_circular_prime(int n)
for(i = 1; i < count; i++)
{
/* Generate rotations and check if it's primes.*/
/* Generate rotations and check if they're prime.*/
n = n % (int)pow(10, count-1) * 10 + n / (int)pow(10, count-1);
if(primes[n] == 0)
{

View File

@ -8,8 +8,8 @@
*
* The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated
* product of 9 and (1,2,3,4,5).
What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n > 1?*/
*
* What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n > 1?*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -30,7 +30,7 @@ int main(int argc, char **argv)
{
break;
}
// Skipping the even numbers.
/*Skipping the even numbers.*/
i -= 2;
}