Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(void)
- {
- for (int i = 0; i < 1048576; i++)
- {
- uint64_t stone = i;
- while (stone > 1)
- {
- char *buf = calloc(1031, sizeof(char));
- sprintf(buf, "%llu", (uint64_t)((stone % 2) ? (stone * 771.0L / 257 + 1) : (stone * 257.0L / 514)));
- stone = strtoull(buf, NULL, 10);
- free(memset(buf, stone, stone % 1031));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement