Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- double dF[10];
- double sF[10];
- double dFs[10];
- double sFs[10];
- int main(void)
- {
- int i;
- int t = 1;
- int ans;
- for (i = 0;i < 10;++i)
- {
- double F,Fs;
- F = 0.111111 * i;
- dF[i] = F * 2;
- sF[i] = F * F;
- Fs = F + 0.000001;
- dFs[i] = Fs * 2;
- sFs[i] = Fs * Fs;
- }
- while (1)
- {
- for (i = 0;i < 10;++i)
- {
- if (floor (sF[i] + t * dF[i]) != floor (sFs[i] + t * dFs[i]) && floor (sFs[i] + t * dFs[i]) != sFs[i] + t * dFs[i])
- {
- ans = sFs[i] + t * dFs[i] + t * t;
- goto end;
- }
- }
- t++;
- }
- end:
- printf ("%d\n",ans);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement