Can anyone help me with this type of codes?

Can anyone help me with this type of codes?
0

#include
#include
using namespace std;

int main(){
int a = 600851475143;
int b = 1;
int remain = 1;
int TheBig = 0;
while (b < 600851475143){
remain = a% b;
if (remain == 0){
TheBig = b;
}
b++;
}
cout <<TheBig;
return 0;
}

My code above got the error type of : overflow in implicit constant conversion. I tried this algorithm in python, but it sent no output. Can you help me with this type of code?

Note: there are two header file llibraries I used but it didn’t display, these are iostream and cmath

This looks like in C++.

Integer could only handle up to 2.1 billion positive numbers. You have assigned the value 600billion of an int data type that can handle again around 2.1billion thus the implicit overflow error.

Check the data types here.

You can instead used long long int for this very large value that you use here.