Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include <stdint.h>
- #include <math.h>
- using namespace std;
- int main() {
- long double Num = 0.0L;
- bool prim = true;
- for(long double i=5.0L; i<(600851475143L)/2; i+=2)
- {
- prim = true;
- for(long double z=3.0L; z<sqrt(i); z+=2)
- {
- if(fmod(i, z) == 0)
- {
- prim = false;
- break;
- }
- }
- if(prim)
- if(fmod(600851475143L, i)==0)
- Num = i;
- }
- cout << Num << "\n";
- system("Pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment