Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool prostoe(int i)
- {
- for(int j=2;j<i/2;j++)
- if(i%j==0)
- return 0;
- return 1;
- }
- int main()
- {
- for(int i=600851475143/2;i!=0;i--)
- {
- if(600851475143%i==0 && prostoe(i))
- cout<<i;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement