first submission🥷 less go 🤗
get stucked in first line but later with the help of @ChatGPT how to approach this problem and then got the logic behind this ques well mostly i did chatgpt bcz of syntax coz i'm learning java since last 4 days so i forget also not know much syntax!