According to my experience of problem B in Round 15, the output for (long long) seems not always good for language:GNU C++4.
I used "printf("%lld",R);", and got WA on test 17.
After replacing it with "printf("I64d",R)", and got Accepted.
I used "printf("%lld",R);", and got WA on test 17.
After replacing it with "printf("I64d",R)", and got Accepted.