Created
January 16, 2014 01:50
-
-
Save 5kg/8448446 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <limits.h> | |
| #include <time.h> | |
| int main() | |
| { | |
| time_t lo = 0x0, hi = LONG_MAX, mid; | |
| while (lo < hi) { | |
| mid = lo + (hi-lo)/2; | |
| if (ctime(&mid)) | |
| lo = mid + 1; | |
| else | |
| hi = mid; | |
| } | |
| --mid; | |
| printf("%lu %#lx\n", mid, mid); | |
| printf("%s", ctime(&mid)); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
67767976233503999 0xf0c29d868b8cff
Tue Dec 31 23:59:59 2147483647