From d8d6d566339a94d927f5cada6ac66f07612a86c7 Mon Sep 17 00:00:00 2001 From: Daniele Fucini Date: Wed, 2 Oct 2019 09:35:23 +0200 Subject: [PATCH] Add more solutions Added solutions for problems 85, 86, 87, 89, 92 and 95 in C. --- C/p085.c | 50 +++ C/p086.c | 56 +++ C/p087.c | 93 +++++ C/p089.c | 108 ++++++ C/p092.c | 84 +++++ C/p095.c | 175 +++++++++ C/roman.txt | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1566 insertions(+) create mode 100644 C/p085.c create mode 100644 C/p086.c create mode 100644 C/p087.c create mode 100644 C/p089.c create mode 100644 C/p092.c create mode 100644 C/p095.c create mode 100644 C/roman.txt diff --git a/C/p085.c b/C/p085.c new file mode 100644 index 0000000..0bfd024 --- /dev/null +++ b/C/p085.c @@ -0,0 +1,50 @@ +/* By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles. + * + * Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.*/ + +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int i, j, n, diff, min_diff = INT_MAX, area; + double elapsed; + struct timespec start, end; + + clock_gettime(CLOCK_MONOTONIC, &start); + + for(i = 1; i < 100; i++) + { + for(j = 1; j <= i; j++) + { + /* In a 2x3 grid, we can take rectangles of height 2 in 3 ways + * (two rectangles of height one and one of height 2). For the + * width, can take 6 rectangles (3 of width 1, 2 of width 2 and + * 1 of width 3). The total is 6x3=18 rectagles. + * Extending to mxn, we can take (m+m-1+m-2+...+1)x(n+n-1+n-2+...+1)= + * m(m+1)/2*n(n+1)/2=m(m+1)*n(n+1)/4 rectangles.*/ + n = ( i * (i + 1) * j * (j + 1)) / 4; + diff = abs(2000000 - n); + + if(diff < min_diff) + { + min_diff = diff; + area = i * j; + } + } + } + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 85\n"); + printf("Answer: %d\n", area); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} diff --git a/C/p086.c b/C/p086.c new file mode 100644 index 0000000..6c80022 --- /dev/null +++ b/C/p086.c @@ -0,0 +1,56 @@ +/* A spider, S, sits in one corner of a cuboid room, measuring 6 by 5 by 3, and a fly, F, sits in the opposite corner. + * By travelling on the surfaces of the room the shortest "straight line" distance from S to F is 10 and the path is shown on the diagram. + * + * However, there are up to three "shortest" path candidates for any given cuboid and the shortest route doesn't always have integer length. + * + * It can be shown that there are exactly 2060 distinct cuboids, ignoring rotations, with integer dimensions, + * up to a maximum size of M by M by M, for which the shortest route has integer length when M = 100. + * This is the least value of M for which the number of solutions first exceeds two thousand; the number of solutions when M = 99 is 1975. + * + * Find the least value of M such that the number of solutions first exceeds one million.*/ + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int a, b, c, count = 0; + double d, elapsed; + struct timespec start, end; + + clock_gettime(CLOCK_MONOTONIC, &start); + + a = 0; + + while(count <= 1000000) + { + a++; + + for(b = 1; b <= a; b++) + { + for(c = 1; c <= b; c++) + { + /* Unfolding the cuboid, it's obvious that the shortest path + * is the hypotenuse of a triangle, and the catheti are the + * longest side of the cubois and the sum of the other two sides.*/ + d = sqrt(a*a+(b+c)*(b+c)); + + if(d == (int)d) + count++; + } + } + } + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 86\n"); + printf("Answer: %d\n", a); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} diff --git a/C/p087.c b/C/p087.c new file mode 100644 index 0000000..36a1fea --- /dev/null +++ b/C/p087.c @@ -0,0 +1,93 @@ +/* The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, + * there are exactly four numbers below fifty that can be expressed in such a way: + * + * 28 = 22 + 23 + 24 + * 33 = 32 + 23 + 24 + * 49 = 52 + 23 + 24 + * 47 = 22 + 33 + 24 + * + * How many numbers below fifty million can be expressed as the sum of a prime square, prime cube, and prime fourth power?*/ + +#include +#include +#include +#include +#include "projecteuler.h" + +#define N 50000000 +#define SQRT_N 7071 +#define RAD3_N 368 +#define RAD4_N 84 + +int *primes; + +int main(int argc, char **argv) +{ + int count = 0; + int *numbers; + long int i, j, k, n; + double elapsed; + struct timespec start, end; + + clock_gettime(CLOCK_MONOTONIC, &start); + + /* Generate primes up to the square root of the limit.*/ + if((primes = sieve(SQRT_N)) == NULL) + { + fprintf(stderr, "Error! Sieve function returned NULL\n"); + return 1; + } + + if((numbers = (int *)calloc(N, sizeof(int))) == NULL) + { + fprintf(stderr, "Error while allocating memory\n"); + return 1; + } + + /* If i>sqrt(n), i*i will be >n, so n won't be a sum of + * a square, cube and fourth power.*/ + for(i = 2; i <= SQRT_N; i++) + { + /* If i is not prime, try next number.*/ + if(primes[i]) + { + /* If j>cubic_root(n), j*j*j will be >n.*/ + for(j = 2; j <= RAD3_N; j++) + { + if(primes[j]) + { + /* If k>fourth_root(n), k*k*k*k will be >n.*/ + for(k = 2; k <= RAD4_N; k++) + { + if(primes[k]) + { + n = i * i + j * j * j + k * k * k * k; + + /* Check if the number found is lower than the limit, + * and make sure it hasn't been found before.*/ + if(n < N && numbers[n] == 0) + { + count++; + numbers[n] = 1; + } + } + } + } + } + } + } + + free(primes); + free(numbers); + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 87\n"); + printf("Answer: %d\n", count); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} diff --git a/C/p089.c b/C/p089.c new file mode 100644 index 0000000..684212c --- /dev/null +++ b/C/p089.c @@ -0,0 +1,108 @@ +/* For a number written in Roman numerals to be considered valid there are basic rules which must be followed. + * Even though the rules allow some numbers to be expressed in more than one way there is always a "best" way of writing a particular number. + * + * For example, it would appear that there are at least six ways of writing the number sixteen: + * + * IIIIIIIIIIIIIIII + * VIIIIIIIIIII + * VVIIIIII + * XIIIIII + * VVVI + * XVI + * + * However, according to the rules only XIIIIII and XVI are valid, and the last example is considered to be the most efficient, + * as it uses the least number of numerals. + * The 11K text file, roman.txt contains one thousand numbers written in valid, but not necessarily minimal, Roman numerals; + * see About... Roman Numerals for the definitive rules for this problem. + * + * Find the number of characters saved by writing each of these in their minimal form. + * + * Note: You can assume that all the Roman numerals in the file contain no more than four consecutive identical units.*/ + +#include +#include +#include +#include + +int reduce(char *numeral, int l); + +int main(int argc, char **argv) +{ + int i, l, count = 0, count_reduced = 0; + char *numerals[1000]; + double elapsed; + struct timespec start, end; + FILE *fp; + + clock_gettime(CLOCK_MONOTONIC, &start); + + if((fp = fopen("roman.txt", "r")) == NULL) + { + fprintf(stderr, "Error while opening file %s\n", "roman.txt"); + return 1; + } + + /* Get the roman numerals from file, for each find its length, then + * reduce it and find the new length. At the end, find the difference + * of the two lengths.*/ + for(i = 0; i < 1000; i++) + { + fscanf(fp, "%ms", &numerals[i]); + l = strlen(numerals[i]); + count += l; + l = reduce(numerals[i], l); + count_reduced += l; + free(numerals[i]); + } + + fclose(fp); + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 89\n"); + printf("Answer: %d\n", count-count_reduced); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} + +int reduce(char *numeral, int l) +{ + /* DCCCC = CM.*/ + if(strstr(numeral, "DCCCC") != NULL) + { + l -= 3; + } + /* CCCC = CD.*/ + else if(strstr(numeral, "CCCC") != NULL) + { + l -= 2; + } + + /* LXXXX = XC.*/ + if(strstr(numeral, "LXXXX") != NULL) + { + l -= 3; + } + /* XXXX = XL.*/ + else if(strstr(numeral, "XXXX") != NULL) + { + l -= 2; + } + + /* VIIII = IX.*/ + if(strstr(numeral, "VIIII") != NULL) + { + l -= 3; + } + /* IIII = IV.*/ + else if(strstr(numeral, "IIII") != NULL) + { + l -= 2; + } + + return l; +} diff --git a/C/p092.c b/C/p092.c new file mode 100644 index 0000000..e757dbe --- /dev/null +++ b/C/p092.c @@ -0,0 +1,84 @@ +/* A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before. + * + * For example, + * + * 44 → 32 → 13 → 10 → 1 → 1 + * 85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89 + * + * Therefore any chain that arrives at 1 or 89 will become stuck in an endless loop. What is most amazing is that + * EVERY starting number will eventually arrive at 1 or 89. + * + * How many starting numbers below ten million will arrive at 89?*/ + +#include +#include +#include + +#define N 10000000 + +int chains[N] = {0}; + +int chain(int n); + +int main(int argc, char **argv) +{ + int i, count; + double elapsed; + struct timespec start, end; + + clock_gettime(CLOCK_MONOTONIC, &start); + + for(i = 1; i < N; i++) + { + /* Simply create a chain for each number and check if it ends at 89, saving + * the result so it can be reused.*/ + if((chains[i] = chain(i)) == 89) + { + count++; + } + } + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 92\n"); + printf("Answer: %d\n", count); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} + +/* Recursively find the chain for n.*/ +int chain(int n) +{ + int tmp = 0, digit; + + /* If n=1 or n=89, we reached the end of the chain.*/ + if(n == 1) + { + return 1; + } + + if(n == 89) + { + return 89; + } + + /* If the chain for the current n has already been found, + * return the value.*/ + if(chains[n] != 0) + { + return chains[n]; + } + + while(n > 0) + { + digit = n % 10; + tmp += digit * digit; + n /= 10; + } + + return chain(tmp); +} diff --git a/C/p095.c b/C/p095.c new file mode 100644 index 0000000..6b3aaa0 --- /dev/null +++ b/C/p095.c @@ -0,0 +1,175 @@ +/* The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors + * of 28 are 1, 2, 4, 7, and 14. As the sum of these divisors is equal to 28, we call it a perfect number. + * + * Interestingly the sum of the proper divisors of 220 is 284 and the sum of the proper divisors of 284 is 220, + * forming a chain of two numbers. For this reason, 220 and 284 are called an amicable pair. + * + * Perhaps less well known are longer chains. For example, starting with 12496, we form a chain of five numbers: + * + * 12496 → 14288 → 15472 → 14536 → 14264 (→ 12496 → ...) + * + * Since this chain returns to its starting point, it is called an amicable chain. + * + * Find the smallest member of the longest amicable chain with no element exceeding one million.*/ + +#include +#include +#include +#include +#include "projecteuler.h" + +#define N 1000000 + +int sum_proper_divisors(int i); +int chain(int i, int start, int *min, int l); + +int chains[N] = {0}; +/* Vector to save the current chain values. I started with a longer vector, + * but no chain is longer than 100 elements, so this is sufficient.*/ +int c[100]; +int divisors[N] = {0}; +int *primes; + +int main(int argc, char **argv) +{ + int i, min, min_tmp, length, l_max = -1; + double elapsed; + struct timespec start, end; + + clock_gettime(CLOCK_MONOTONIC, &start); + + if((primes = sieve(N+1)) == NULL) + { + fprintf(stderr, "Error! Sieve function returned NULL\n"); + return 1; + } + + for(i = 4; i <= N; i++) + { + /* Calculate the divisors of i, or retrieve the value if previously calculated. + * If i is equale to the sum of its proper divisors, the length of the chain is 1 + * (i.e. i is a perfect number.*/ + if(divisors[i] == i || (divisors[i] = sum_proper_divisors(i)) == i) + { + length = 1; + chains[i] = length; + } + else if(!primes[i]) + { + min_tmp = i; + length = chain(i, i, &min_tmp, 0); + } + /* If i is prime, 1 is its only proper divisor, so no amicable chain is possible.*/ + else + { + length = -1; + chains[i] = length; + } + + if(length > l_max) + { + l_max = length; + min = min_tmp; + } + } + + free(primes); + + clock_gettime(CLOCK_MONOTONIC, &end); + + elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; + + printf("Project Euler, Problem 95\n"); + printf("Answer: %d\n", min); + + printf("Elapsed time: %.9lf seconds\n", elapsed); + + return 0; +} + +int sum_proper_divisors(int n) +{ + int i, limit, sum = 1; + + limit = floor(sqrt(n)); + + for(i = 2; i <= limit; i++) + { + if(n % i == 0) + { + sum += i; + sum += n / i; + } + } + + if(n == limit * limit) + { + sum -= limit; + } + + return sum; +} + +int chain(int i, int start, int *min, int l) +{ + int n; + + /* If the value of the chain starting with the current number has already + * been calculated, return the value.*/ + if(chains[i] > 0) + { + return chains[i]; + } + + /* If we reached a prime number, the chain will be stuck at 1.*/ + if(primes[i]) + { + return -1; + } + + /* Calculate the divisors of i, or retrieve the value if previously calculated.*/ + if(divisors[i] != 0) + { + n = divisors[i]; + } + else + { + n = sum_proper_divisors(i); + divisors[i] = n; + } + + /* If the next number in the chain is equal to the starting one, the chain is finished.*/ + if(n == start) + { + chains[start] = l + 1; + return l + 1; + } + + /* Save n, i.e. the next value in the chain, and check if it's equal + * to another value of the chain different from start. If it is, the + * chain is stuck in a loop that will not return to the starting number.*/ + c[l] = n; + + for(i = 0; i < l; i++) + { + if(n == c[i]) + { + return -1; + } + } + + /* We are looking for chain where no value is greater than 1000000.*/ + if(n > N) + { + return -1; + } + + /* If the next value is smaller than the minimum value of the chain, + * update the minimum.*/ + if(n < *min) + { + *min = n; + } + + return chain(n, start, min, l+1); +} diff --git a/C/roman.txt b/C/roman.txt new file mode 100644 index 0000000..50651c3 --- /dev/null +++ b/C/roman.txt @@ -0,0 +1,1000 @@ +MMMMDCLXXII +MMDCCCLXXXIII +MMMDLXVIIII +MMMMDXCV +DCCCLXXII +MMCCCVI +MMMCDLXXXVII +MMMMCCXXI +MMMCCXX +MMMMDCCCLXXIII +MMMCCXXXVII +MMCCCLXXXXIX +MDCCCXXIIII +MMCXCVI +CCXCVIII +MMMCCCXXXII +MDCCXXX +MMMDCCCL +MMMMCCLXXXVI +MMDCCCXCVI +MMMDCII +MMMCCXII +MMMMDCCCCI +MMDCCCXCII +MDCXX +CMLXXXVII +MMMXXI +MMMMCCCXIV +MLXXII +MCCLXXVIIII +MMMMCCXXXXI +MMDCCCLXXII +MMMMXXXI +MMMDCCLXXX +MMDCCCLXXIX +MMMMLXXXV +MCXXI +MDCCCXXXVII +MMCCCLXVII +MCDXXXV +CCXXXIII +CMXX +MMMCLXIV +MCCCLXXXVI +DCCCXCVIII +MMMDCCCCXXXIV +CDXVIIII +MMCCXXXV +MDCCCXXXII +MMMMD +MMDCCLXIX +MMMMCCCLXXXXVI +MMDCCXLII +MMMDCCCVIIII +DCCLXXXIIII +MDCCCCXXXII +MMCXXVII +DCCCXXX +CCLXIX +MMMXI +MMMMCMLXXXXVIII +MMMMDLXXXVII +MMMMDCCCLX +MMCCLIV +CMIX +MMDCCCLXXXIIII +CLXXXII +MMCCCCXXXXV +MMMMDLXXXVIIII +MMMDCCCXXI +MMDCCCCLXXVI +MCCCCLXX +MMCDLVIIII +MMMDCCCLIX +MMMMCCCCXIX +MMMDCCCLXXV +XXXI +CDLXXXIII +MMMCXV +MMDCCLXIII +MMDXXX +MMMMCCCLVII +MMMDCI +MMMMCDLXXXIIII +MMMMCCCXVI +CCCLXXXVIII +MMMMCML +MMMMXXIV +MMMCCCCXXX +DCCX +MMMCCLX +MMDXXXIII +CCCLXIII +MMDCCXIII +MMMCCCXLIV +CLXXXXI +CXVI +MMMMCXXXIII +CLXX +DCCCXVIII +MLXVII +DLXXXX +MMDXXI +MMMMDLXXXXVIII +MXXII +LXI +DCCCCXLIII +MMMMDV +MMMMXXXIV +MDCCCLVIII +MMMCCLXXII +MMMMDCCXXXVI +MMMMLXXXIX +MDCCCLXXXI +MMMMDCCCXV +MMMMCCCCXI +MMMMCCCLIII +MDCCCLXXI +MMCCCCXI +MLXV +MMCDLXII +MMMMDXXXXII +MMMMDCCCXL +MMMMCMLVI +CCLXXXIV +MMMDCCLXXXVI +MMCLII +MMMCCCCXV +MMLXXXIII +MMMV +MMMV +DCCLXII +MMDCCCCXVI +MMDCXLVIII +CCLIIII +CCCXXV +MMDCCLXXXVIIII +MMMMDCLXXVIII +MMMMDCCCXCI +MMMMCCCXX +MMCCXLV +MMMDCCCLXIX +MMCCLXIIII +MMMDCCCXLIX +MMMMCCCLXIX +CMLXXXXI +MCMLXXXIX +MMCDLXI +MMDCLXXVIII +MMMMDCCLXI +MCDXXV +DL +CCCLXXII +MXVIIII +MCCCCLXVIII +CIII +MMMDCCLXXIIII +MMMDVIII +MMMMCCCLXXXXVII +MMDXXVII +MMDCCLXXXXV +MMMMCXLVI +MMMDCCLXXXII +MMMDXXXVI +MCXXII +CLI +DCLXXXIX +MMMCLI +MDCLXIII +MMMMDCCXCVII +MMCCCLXXXV +MMMDCXXVIII +MMMCDLX +MMMCMLII +MMMIV +MMMMDCCCLVIII +MMMDLXXXVIII +MCXXIV +MMMMLXXVI +CLXXIX +MMMCCCCXXVIIII +DCCLXXXV +MMMDCCCVI +LI +CLXXXVI +MMMMCCCLXXVI +MCCCLXVI +CCXXXIX +MMDXXXXI +MMDCCCXLI +DCCCLXXXVIII +MMMMDCCCIV +MDCCCCXV +MMCMVI +MMMMCMLXXXXV +MMDCCLVI +MMMMCCXLVIII +DCCCCIIII +MMCCCCIII +MMMDCCLXXXVIIII +MDCCCLXXXXV +DVII +MMMV +DCXXV +MMDCCCXCV +DCVIII +MMCDLXVI +MCXXVIII +MDCCXCVIII +MMDCLX +MMMDCCLXIV +MMCDLXXVII +MMDLXXXIIII +MMMMCCCXXII +MMMDCCCXLIIII +DCCCCLXVII +MMMCLXXXXIII +MCCXV +MMMMDCXI +MMMMDCLXXXXV +MMMCCCLII +MMCMIX +MMDCCXXV +MMDLXXXVI +MMMMDCXXVIIII +DCCCCXXXVIIII +MMCCXXXIIII +MMDCCLXXVIII +MDCCLXVIIII +MMCCLXXXV +MMMMDCCCLXXXVIII +MMCMXCI +MDXLII +MMMMDCCXIV +MMMMLI +DXXXXIII +MMDCCXI +MMMMCCLXXXIII +MMMDCCCLXXIII +MDCLVII +MMCD +MCCCXXVII +MMMMDCCIIII +MMMDCCXLVI +MMMCLXXXVII +MMMCCVIIII +MCCCCLXXIX +DL +DCCCLXXVI +MMDXCI +MMMMDCCCCXXXVI +MMCII +MMMDCCCXXXXV +MMMCDXLV +MMDCXXXXIV +MMD +MDCCCLXXXX +MMDCXLIII +MMCCXXXII +MMDCXXXXVIIII +DCCCLXXI +MDXCVIIII +MMMMCCLXXVIII +MDCLVIIII +MMMCCCLXXXIX +MDCLXXXV +MDLVIII +MMMMCCVII +MMMMDCXIV +MMMCCCLXIIII +MMIIII +MMMMCCCLXXIII +CCIII +MMMCCLV +MMMDXIII +MMMCCCXC +MMMDCCCXXI +MMMMCCCCXXXII +CCCLVI +MMMCCCLXXXVI +MXVIIII +MMMCCCCXIIII +CLXVII +MMMCCLXX +CCCCLXIV +MMXXXXII +MMMMCCLXXXX +MXL +CCXVI +CCCCLVIIII +MMCCCII +MCCCLVIII +MMMMCCCX +MCDLXXXXIV +MDCCCXIII +MMDCCCXL +MMMMCCCXXIII +DXXXIV +CVI +MMMMDCLXXX +DCCCVII +MMCMLXIIII +MMMDCCCXXXIII +DCCC +MDIII +MMCCCLXVI +MMMCCCCLXXI +MMDCCCCXVIII +CCXXXVII +CCCXXV +MDCCCXII +MMMCMV +MMMMCMXV +MMMMDCXCI +DXXI +MMCCXLVIIII +MMMMCMLII +MDLXXX +MMDCLXVI +CXXI +MMMDCCCLIIII +MMMCXXI +MCCIII +MMDCXXXXI +CCXCII +MMMMDXXXV +MMMCCCLXV +MMMMDLXV +MMMCCCCXXXII +MMMCCCVIII +DCCCCLXXXXII +MMCLXIV +MMMMCXI +MLXXXXVII +MMMCDXXXVIII +MDXXII +MLV +MMMMDLXVI +MMMCXII +XXXIII +MMMMDCCCXXVI +MMMLXVIIII +MMMLX +MMMCDLXVII +MDCCCLVII +MMCXXXVII +MDCCCCXXX +MMDCCCLXIII +MMMMDCXLIX +MMMMCMXLVIII +DCCCLXXVIIII +MDCCCLIII +MMMCMLXI +MMMMCCLXI +MMDCCCLIII +MMMDCCCVI +MMDXXXXIX +MMCLXXXXV +MMDXXX +MMMXIII +DCLXXIX +DCCLXII +MMMMDCCLXVIII +MDCCXXXXIII +CCXXXII +MMMMDCXXV +MMMCCCXXVIII +MDCVIII +MMMCLXXXXIIII +CLXXXI +MDCCCCXXXIII +MMMMDCXXX +MMMDCXXIV +MMMCCXXXVII +MCCCXXXXIIII +CXVIII +MMDCCCCIV +MMMMCDLXXV +MMMDLXIV +MDXCIII +MCCLXXXI +MMMDCCCXXIV +MCXLIII +MMMDCCCI +MCCLXXX +CCXV +MMDCCLXXI +MMDLXXXIII +MMMMDCXVII +MMMCMLXV +MCLXVIII +MMMMCCLXXVI +MMMDCCLXVIIII +MMMMDCCCIX +DLXXXXIX +DCCCXXII +MMMMIII +MMMMCCCLXXVI +DCCCXCIII +DXXXI +MXXXIIII +CCXII +MMMDCCLXXXIIII +MMMCXX +MMMCMXXVII +DCCCXXXX +MMCDXXXVIIII +MMMMDCCXVIII +LV +MMMDCCCCVI +MCCCII +MMCMLXVIIII +MDCCXI +MMMMDLXVII +MMCCCCLXI +MMDCCV +MMMCCCXXXIIII +MMMMDI +MMMDCCCXCV +MMDCCLXXXXI +MMMDXXVI +MMMDCCCLVI +MMDCXXX +MCCCVII +MMMMCCCLXII +MMMMXXV +MMCMXXV +MMLVI +MMDXXX +MMMMCVII +MDC +MCCIII +MMMMDCC +MMCCLXXV +MMDCCCXXXXVI +MMMMCCCLXV +CDXIIII +MLXIIII +CCV +MMMCMXXXI +CCCCLXVI +MDXXXII +MMMMCCCLVIII +MMV +MMMCLII +MCMLI +MMDCCXX +MMMMCCCCXXXVI +MCCLXXXI +MMMCMVI +DCCXXX +MMMMCCCLXV +DCCCXI +MMMMDCCCXIV +CCCXXI +MMDLXXV +CCCCLXXXX +MCCCLXXXXII +MMDCIX +DCCXLIIII +DXIV +MMMMCLII +CDLXI +MMMCXXVII +MMMMDCCCCLXIII +MMMDCLIIII +MCCCCXXXXII +MMCCCLX +CCCCLIII +MDCCLXXVI +MCMXXIII +MMMMDLXXVIII +MMDCCCCLX +MMMCCCLXXXX +MMMCDXXVI +MMMDLVIII +CCCLXI +MMMMDCXXII +MMDCCCXXI +MMDCCXIII +MMMMCLXXXVI +MDCCCCXXVI +MDV +MMDCCCCLXXVI +MMMMCCXXXVII +MMMDCCLXXVIIII +MMMCCCCLXVII +DCCXLI +MMCLXXXVIII +MCCXXXVI +MMDCXLVIII +MMMMCXXXII +MMMMDCCLXVI +MMMMCMLI +MMMMCLXV +MMMMDCCCXCIV +MCCLXXVII +LXXVIIII +DCCLII +MMMCCCXCVI +MMMCLV +MMDCCCXXXXVIII +DCCCXV +MXC +MMDCCLXXXXVII +MMMMCML +MMDCCCLXXVIII +DXXI +MCCCXLI +DCLXXXXI +MMCCCLXXXXVIII +MDCCCCLXXVIII +MMMMDXXV +MMMDCXXXVI +MMMCMXCVII +MMXVIIII +MMMDCCLXXIV +MMMCXXV +DXXXVIII +MMMMCLXVI +MDXII +MMCCCLXX +CCLXXI +DXIV +MMMCLIII +DLII +MMMCCCXLIX +MMCCCCXXVI +MMDCXLIII +MXXXXII +CCCLXXXV +MDCLXXVI +MDCXII +MMMCCCLXXXIII +MMDCCCCLXXXII +MMMMCCCLXXXV +MMDCXXI +DCCCXXX +MMMDCCCCLII +MMMDCCXXII +MMMMCDXCVIII +MMMCCLXVIIII +MMXXV +MMMMCDXIX +MMMMCCCX +MMMCCCCLXVI +MMMMDCLXXVIIII +MMMMDCXXXXIV +MMMCMXII +MMMMXXXIII +MMMMDLXXXII +DCCCLIV +MDXVIIII +MMMCLXXXXV +CCCCXX +MMDIX +MMCMLXXXVIII +DCCXLIII +DCCLX +D +MCCCVII +MMMMCCCLXXXIII +MDCCCLXXIIII +MMMDCCCCLXXXVII +MMMMCCCVII +MMMDCCLXXXXVI +CDXXXIV +MCCLXVIII +MMMMDLX +MMMMDXII +MMMMCCCCLIIII +MCMLXXXXIII +MMMMDCCCIII +MMDCLXXXIII +MDCCCXXXXIV +XXXXVII +MMMDCCCXXXII +MMMDCCCXLII +MCXXXV +MDCXXVIIII +MMMCXXXXIIII +MMMMCDXVII +MMMDXXIII +MMMMCCCCLXI +DCLXXXXVIIII +LXXXXI +CXXXIII +MCDX +MCCLVII +MDCXXXXII +MMMCXXIV +MMMMLXXXX +MMDCCCCXLV +MLXXX +MMDCCCCLX +MCDLIII +MMMCCCLXVII +MMMMCCCLXXIV +MMMDCVIII +DCCCCXXIII +MMXCI +MMDCCIV +MMMMDCCCXXXIV +CCCLXXI +MCCLXXXII +MCMIII +CCXXXI +DCCXXXVIII +MMMMDCCXLVIIII +MMMMCMXXXV +DCCCLXXV +DCCXCI +MMMMDVII +MMMMDCCCLXVIIII +CCCXCV +MMMMDCCXX +MCCCCII +MMMCCCXC +MMMCCCII +MMDCCLXXVII +MMDCLIIII +CCXLIII +MMMDCXVIII +MMMCCCIX +MCXV +MMCCXXV +MLXXIIII +MDCCXXVI +MMMCCCXX +MMDLXX +MMCCCCVI +MMDCCXX +MMMMDCCCCXCV +MDCCCXXXII +MMMMDCCCCXXXX +XCIV +MMCCCCLX +MMXVII +MLXXI +MMMDXXVIII +MDCCCCII +MMMCMLVII +MMCLXXXXVIII +MDCCCCLV +MCCCCLXXIIII +MCCCLII +MCDXLVI +MMMMDXVIII +DCCLXXXIX +MMMDCCLXIV +MDCCCCXLIII +CLXXXXV +MMMMCCXXXVI +MMMDCCCXXI +MMMMCDLXXVII +MCDLIII +MMCCXLVI +DCCCLV +MCDLXX +DCLXXVIII +MMDCXXXIX +MMMMDCLX +MMDCCLI +MMCXXXV +MMMCCXII +MMMMCMLXII +MMMMCCV +MCCCCLXIX +MMMMCCIII +CLXVII +MCCCLXXXXIIII +MMMMDCVIII +MMDCCCLXI +MMLXXIX +CMLXIX +MMDCCCXLVIIII +DCLXII +MMMCCCXLVII +MDCCCXXXV +MMMMDCCXCVI +DCXXX +XXVI +MMLXIX +MMCXI +DCXXXVII +MMMMCCCXXXXVIII +MMMMDCLXI +MMMMDCLXXIIII +MMMMVIII +MMMMDCCCLXII +MDCXCI +MMCCCXXIIII +CCCCXXXXV +MMDCCCXXI +MCVI +MMDCCLXVIII +MMMMCXL +MLXVIII +CMXXVII +CCCLV +MDCCLXXXIX +MMMCCCCLXV +MMDCCLXII +MDLXVI +MMMCCCXVIII +MMMMCCLXXXI +MMCXXVII +MMDCCCLXVIII +MMMCXCII +MMMMDCLVIII +MMMMDCCCXXXXII +MMDCCCCLXXXXVI +MDCCXL +MDCCLVII +MMMMDCCCLXXXVI +DCCXXXIII +MMMMDCCCCLXXXV +MMCCXXXXVIII +MMMCCLXXVIII +MMMDCLXXVIII +DCCCI +MMMMLXXXXVIIII +MMMCCCCLXXII +MMCLXXXVII +CCLXVI +MCDXLIII +MMCXXVIII +MDXIV +CCCXCVIII +CLXXVIII +MMCXXXXVIIII +MMMDCLXXXIV +CMLVIII +MCDLIX +MMMMDCCCXXXII +MMMMDCXXXIIII +MDCXXI +MMMDCXLV +MCLXXVIII +MCDXXII +IV +MCDLXXXXIII +MMMMDCCLXV +CCLI +MMMMDCCCXXXVIII +DCLXII +MCCCLXVII +MMMMDCCCXXXVI +MMDCCXLI +MLXI +MMMCDLXVIII +MCCCCXCIII +XXXIII +MMMDCLXIII +MMMMDCL +DCCCXXXXIIII +MMDLVII +DXXXVII +MCCCCXXIIII +MCVII +MMMMDCCXL +MMMMCXXXXIIII +MCCCCXXIV +MMCLXVIII +MMXCIII +MDCCLXXX +MCCCLIIII +MMDCLXXI +MXI +MCMLIV +MMMCCIIII +DCCLXXXVIIII +MDCLIV +MMMDCXIX +CMLXXXI +DCCLXXXVII +XXV +MMMXXXVI +MDVIIII +CLXIII +MMMCDLVIIII +MMCCCCVII +MMMLXX +MXXXXII +MMMMCCCLXVIII +MMDCCCXXVIII +MMMMDCXXXXI +MMMMDCCCXXXXV +MMMXV +MMMMCCXVIIII +MMDCCXIIII +MMMXXVII +MDCCLVIIII +MMCXXIIII +MCCCLXXIV +DCLVIII +MMMLVII +MMMCXLV +MMXCVII +MMMCCCLXXXVII +MMMMCCXXII +DXII +MMMDLV +MCCCLXXVIII +MMMCLIIII +MMMMCLXXXX +MMMCLXXXIIII +MDCXXIII +MMMMCCXVI +MMMMDLXXXIII +MMMDXXXXIII +MMMMCCCCLV +MMMDLXXXI +MMMCCLXXVI +MMMMXX +MMMMDLVI +MCCCCLXXX +MMMXXII +MMXXII +MMDCCCCXXXI +MMMDXXV +MMMDCLXXXVIIII +MMMDLXXXXVII +MDLXIIII +CMXC +MMMXXXVIII +MDLXXXVIII +MCCCLXXVI +MMCDLIX +MMDCCCXVIII +MDCCCXXXXVI +MMMMCMIV +MMMMDCIIII +MMCCXXXV +XXXXVI +MMMMCCXVII +MMCCXXIV +MCMLVIIII +MLXXXIX +MMMMLXXXIX +CLXXXXIX +MMMDCCCCLVIII +MMMMCCLXXIII +MCCCC +DCCCLIX +MMMCCCLXXXII +MMMCCLXVIIII +MCLXXXV +CDLXXXVII +DCVI +MMX +MMCCXIII +MMMMDCXX +MMMMXXVIII +DCCCLXII +MMMMCCCXLIII +MMMMCLXV +DXCI +MMMMCLXXX +MMMDCCXXXXI +MMMMXXXXVI +DCLX +MMMCCCXI +MCCLXXX +MMCDLXXII +DCCLXXI +MMMCCCXXXVI +MCCCCLXXXVIIII +CDLVIII +DCCLVI +MMMMDCXXXVIII +MMCCCLXXXIII +MMMMDCCLXXV +MMMXXXVI +CCCLXXXXIX +CV +CCCCXIII +CCCCXVI +MDCCCLXXXIIII +MMDCCLXXXII +MMMMCCCCLXXXI +MXXV +MMCCCLXXVIIII +MMMCCXII +MMMMCCXXXIII +MMCCCLXXXVI +MMMDCCCLVIIII +MCCXXXVII +MDCLXXV +XXXV +MMDLI +MMMCCXXX +MMMMCXXXXV +CCCCLIX +MMMMDCCCLXXIII +MMCCCXVII +DCCCXVI +MMMCCCXXXXV +MDCCCCXCV +CLXXXI +MMMMDCCLXX +MMMDCCCIII +MMCLXXVII +MMMDCCXXIX +MMDCCCXCIIII +MMMCDXXIIII +MMMMXXVIII +MMMMDCCCCLXVIII +MDCCCXX +MMMMCDXXI +MMMMDLXXXIX +CCXVI +MDVIII +MMCCLXXI +MMMDCCCLXXI +MMMCCCLXXVI +MMCCLXI +MMMMDCCCXXXIV +DLXXXVI +MMMMDXXXII +MMMXXIIII +MMMMCDIV +MMMMCCCXLVIII +MMMMCXXXVIII +MMMCCCLXVI +MDCCXVIII +MMCXX +CCCLIX +MMMMDCCLXXII +MDCCCLXXV +MMMMDCCCXXIV +DCCCXXXXVIII +MMMDCCCCXXXVIIII +MMMMCCXXXV +MDCLXXXIII +MMCCLXXXIV +MCLXXXXIIII +DXXXXIII +MCCCXXXXVIII +MMCLXXIX +MMMMCCLXIV +MXXII +MMMCXIX +MDCXXXVII +MMDCCVI +MCLXXXXVIII +MMMCXVI +MCCCLX +MMMCDX +CCLXVIIII +MMMCCLX +MCXXVIII +LXXXII +MCCCCLXXXI +MMMI +MMMCCCLXIV +MMMCCCXXVIIII +CXXXVIII +MMCCCXX +MMMCCXXVIIII +MCCLXVI +MMMCCCCXXXXVI +MMDCCXCIX +MCMLXXI +MMCCLXVIII +CDLXXXXIII +MMMMDCCXXII +MMMMDCCLXXXVII +MMMDCCLIV +MMCCLXIII +MDXXXVII +DCCXXXIIII +MCII +MMMDCCCLXXI +MMMLXXIII +MDCCCLIII +MMXXXVIII +MDCCXVIIII +MDCCCCXXXVII +MMCCCXVI +MCMXXII +MMMCCCLVIII +MMMMDCCCXX +MCXXIII +MMMDLXI +MMMMDXXII +MDCCCX +MMDXCVIIII +MMMDCCCCVIII +MMMMDCCCCXXXXVI +MMDCCCXXXV +MMCXCIV +MCMLXXXXIII +MMMCCCLXXVI +MMMMDCLXXXV +CMLXIX +DCXCII +MMXXVIII +MMMMCCCXXX +XXXXVIIII \ No newline at end of file