Can anyone provide some hints to this problem? Although N <= 10^18 but there is some pattern which I am not able to detect.
This program works fine on my system but the website gives error: "Grading Failure due to Network Outage; Please Resubmit in a Bit"
I've tried resubmitting but it keeps on giving this error
seq,n = input().split()
I got it cooler!
#include <iostream> using namespace std;
using namespace std;
Here's the c++11 solution for beginners like me
#include <iostream>#include <string>
How did you solve this one @keshav ?