This is my submission 7534581 for Little Dima and equations .
When i'm running this in my laptop for the Same input of
Pretest 1:
3 2 8
My output is 3 10 2008 13726
But when i'm submitting this solution , it says wrong answer on pretest 1 and when i check the judgement protocol of this submission ,
it is showing the output of pretest 1 as
2
10 2008 .
This solution works on clang, but not on gcc 4.7
Why i compiled this in my laptop with gcc only.
Oh, sorry. It's,because you are casting double to long long. pow(19, 3) can equals to 6858.(9)? but when you cast you receive 6858.
write your own pow(x,y) for long long. I think you'll get AC.