Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include <ctype.h>
- #include <stdlib.h>
- unsigned long long int compare(const void *a, const void *b)
- {
- return (*(unsigned long long int*)a - *(unsigned long long int*)b);
- }
- unsigned long long int ar[100000];
- int main()
- {
- unsigned long long int t, i, j, k, l, a, b, c, d, x, y, z;
- printf("1\n");
- k = 0;
- for (i = 2; i < 65536; i++)
- {
- x = i * i;
- y = x * x;
- ar[k] = y;
- k++;
- }
- for (i = 2; i <= 138; i++)
- {
- x = i * i * i;
- y = x * x * x ;
- ar[k] = y;
- k++;
- }
- for (i = 2; i < 16; i++)
- {
- x = i * i * i * i;
- y = x * x * x * x;
- ar[k] = y;
- k++;
- }
- for (i = 2; i < 6; i++)
- {
- x = i * i * i * i * i;
- y = x * x * x * x * x;
- ar[k] = y;
- k++;
- }
- for (i = 2; i <= 3; i++)
- {
- x = i * i * i * i * i * i;
- y = x * x * x * x * x * x;
- ar[k] = y;
- k++;
- }
- for (i = 2; i < 3; i++)
- {
- x = i * i * i * i * i * i * i;
- y = x * x * x * x * x * x * x;
- ar[k] = y;
- k++;
- }
- qsort(ar, k, sizeof(unsigned long long int), compare);
- /*for (j = k - 2; j >= 0; j--)
- {
- for (l = 0; l <= j; l++)
- {
- if (ar[l] > ar[l + 1])
- {
- a = ar[l];
- ar[l] = ar[l + 1];
- ar[l + 1] = a;
- }
- }
- }*/
- for (j = 0; j < k; j++)
- {
- if (ar[j] != ar[j - 1])
- {
- printf("%llu\n", ar[j]);
- }
- }
- //z = sizeof(unsigned long long int);
- //printf("%llu", z);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement