M_Rajesh's blog

By M_Rajesh, 10 years ago, In English

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 .

  • Vote: I like it
  • -4
  • Vote: I do not like it

| Write comment?
»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This solution works on clang, but not on gcc 4.7

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why i compiled this in my laptop with gcc only.

    • »
      »
      »
      10 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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.

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

write your own pow(x,y) for long long. I think you'll get AC.