//online parser:
https://www.bccn.net/run/
程序代码:
#include <stdio.h>
int main(int argc, char *argv[])
{
int a[10], n, i, j;
for (i = 0; i < 10; i++) {
//get n
n = ((unsigned char *)main)[25 + i] % 10;
printf("n = %d\n", n);
//end
if(!n) {
puts("End of Input"); break;
}
//pos
for (j = 0; j < n; j++) {
a[j] = ((unsigned char *)main)[125 + j];
printf("%d ", a[j]);
}
puts("");
//rev
for (j = n - 1; j >= 0; j--)
printf("%d ", a[j]);
puts("");
}
return 0;
}
output sample:
n = 7
0 232 87 254 255 255 131
131 255 255 254 87 232 0
n = 9
0 232 87 254 255 255 131 125 204
204 125 131 255 255 254 87 232 0
n = 8
0 232 87 254 255 255 131 125
125 131 255 255 254 87 232 0
n = 9
0 232 87 254 255 255 131 125 204
204 125 131 255 255 254 87 232 0
n = 2
0 232
232 0
n = 9
0 232 87 254 255 255 131 125 204
204 125 131 255 255 254 87 232 0
n = 9
0 232 87 254 255 255 131 125 204
204 125 131 255 255 254 87 232 0
n = 6
0 232 87 254 255 255
255 255 254 87 232 0
n = 0
End of Input