I guess you mean something plugged into the mains electricity, but you can't charge direct from the mains so I assume you're using some form of charger.
I am surprised at the output the following C program gives
#include <stdio.h>
int main(void)
{
int a = 97875;
int b = 74255;
if (a * b <= a + b)
{
printf("YES");
}
else
{
printf("NO");
}
}
I expect the output to be NO, but the program outputs YES. I guess it has something to do with a * b being out of the range of numbers an int can store.
So, I should somehow explicitly invoke long somewhere, but I don't know where.