43 lines
908 B
C
43 lines
908 B
C
#include <stdio.h>
|
|
int LINE[700000] = {0};
|
|
|
|
void test(int& a) {
|
|
a++;
|
|
}
|
|
|
|
int main() {
|
|
int i = 1;
|
|
for (int j = 1; j <= 100000; j++) {
|
|
while (LINE[j] == 0) {
|
|
int flag = 0;
|
|
int transform = i;
|
|
if (transform % 7 != 0) {
|
|
while (transform > 0) {
|
|
if (transform % 10 == 7) {
|
|
flag++;
|
|
}
|
|
transform /= 10;
|
|
}
|
|
} else {
|
|
flag++;
|
|
}
|
|
if (flag == 0) {
|
|
LINE[j] = i;
|
|
i++;
|
|
} else {
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
int group = 0;
|
|
scanf("%d", &group);
|
|
for (int z = 1; z <= group; z++) {
|
|
int input = 0;
|
|
scanf("%d", &input);
|
|
printf("%d\n", LINE[input]);
|
|
}
|
|
int val = *(LINE+5);
|
|
int a=1;
|
|
return 0;
|
|
}
|