Help -- KRILLIN problem getting WA

Link to problem :

My submission :

Getting WA – need help

EDIT : It’s accepted now. Did a very silly mistake of specifying wrong datatype in getKth function where I wrote int K and the only fix required was long long K – but it took many hours to observe this :frowning: