2018-07-05 18:03:25 +00:00
|
|
|
#include <stdio.h>
|
2018-09-12 02:01:51 +00:00
|
|
|
#include <stdlib.h>
|
2018-07-05 18:03:25 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
|
|
|
|
int x,y,cycles,desired,range=10;
|
|
|
|
|
2018-09-12 02:01:51 +00:00
|
|
|
desired=3116;
|
2018-07-05 18:03:25 +00:00
|
|
|
|
2018-09-12 02:01:51 +00:00
|
|
|
if (argc>1) desired=atoi(argv[1]);
|
2018-07-05 18:03:25 +00:00
|
|
|
|
|
|
|
printf("You want %d cycles\n",desired);
|
|
|
|
for(x=0;x<255;x++) {
|
|
|
|
for(y=0;y<255;y++) {
|
|
|
|
cycles=1+5*y+y*(5*x+1);
|
|
|
|
if (((cycles-desired)<range) && ((cycles-desired)>-range)) {
|
|
|
|
printf("Try X=%d Y=%d cycles=%d\n",
|
|
|
|
x,y,cycles);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|