Input mismatch in code

https://ide.codingblocks.com/s/152017 This code is showing input mismatch for 10^15

Hi @tanjuljain19,
You have declared n and k as long data types but using NextInt for input.
n=sc.nextInt();
k=sc.nextInt();
This is wrong.

It should be nextLong. I have pasted the correct approach below.
n = sc.nextLong();
k = sc.nextLong();