PARTIALLY CORRECT IN CHEF AND DYNAMO

My solution is CodeChef: Practical coding for everyone

I think it’s something relating to large values
Try using unsigned long long maybe ?
Also,
Try it for
t = 1
N = 18
and biggest/huge values : 10^18-1 and observe the output

1 Like

its still not working sir CodeChef: Practical coding for everyone

i was doing the same thing, had the same error, try casting: worked for me !

typecast the values to ll before printing them(i.e. use cout<<ll(value) instead of just cout<<value)
and use powl instead of pow. U’ll get an AC.

1 Like

First store pow(10,n) in a variable, like long long x=pow(10,n). And later instead of writing pow(10,n) everywhere use x. I had the same problem, fixed it in this way. Anyone can tell reason for this ?

u just have to typecast it to long long.