How can I solve it? can you provide me the code?

hello @tasfikrahman007
pls share the problem link with me

it is not from any online judges. its from a pdf file that I came accross . solving for a particular company