Add comments
Added comments to the python code for the first 25 problems
This commit is contained in:
1
C/p003.c
1
C/p003.c
@ -4,7 +4,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include "projecteuler.h"
|
||||
|
||||
|
2
C/p011.c
2
C/p011.c
@ -1,4 +1,4 @@
|
||||
/* n the 20×20 grid below, four numbers along a diagonal line have been marked in red.
|
||||
/* In the 20×20 grid below, four numbers along a diagonal line have been marked in red.
|
||||
*
|
||||
* 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
|
||||
* 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
|
||||
|
2
C/p020.c
2
C/p020.c
@ -33,7 +33,7 @@ int main(int argc, char **argv)
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &end);
|
||||
|
||||
elapsed=(end.tv_sec-start.tv_sec)+(double)(end.tv_nsec-start.tv_nsec)/1000000000;
|
||||
elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000;
|
||||
|
||||
printf("Project Euler, Problem 20\n");
|
||||
gmp_printf("Answer: %Zd\n", sum);
|
||||
|
4
C/p021.c
4
C/p021.c
@ -3,8 +3,8 @@
|
||||
*
|
||||
* For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284.
|
||||
* The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.
|
||||
|
||||
Evaluate the sum of all the amicable numbers under 10000.*/
|
||||
*
|
||||
* Evaluate the sum of all the amicable numbers under 10000.*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
Reference in New Issue
Block a user