How to solve this question ? Here n<=10^5 and k<=10^14

Правка en1, от Ryuma_7810, 2024-04-07 19:16:25

I have been unable to solve the question in this image. the most concerning part is k can be as large as 10^14 which doesn't give much options how to traverse and apply the logic. Please provide me a good approach to solve this

Теги help me, c++, python3

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Ryuma_7810 2024-04-07 19:17:19 838
en1 Английский Ryuma_7810 2024-04-07 19:16:25 281 Initial revision (published)