Company: Zluri

Difficulty: medium

Problem Statement

Reclaimable SaaS Seat Cost An IT administrator reviews `N` SaaS-license assignments. Each assignment contains an email address, the number of days since the owner was last active, and the monthly seat cost. Given an inactivity threshold `D`, a seat is reclaimable when its days-since-last-active value is at least `D`, or when that value is `-1` (the owner has never logged in). Print the total monthly cost of all reclaimable seats. Input Format The first line contains `N`. Each of the next `N` lines contains `email daysSinceLastActive monthlyCost`. The last line contains `D`. Output Format Print one integer: the total reclaimable monthly cost. Constraints `1 <= N <= 200000`; days are `-1` or in `[0,100000]`; costs are in `[0,25000]`; `1 <= D <= 100000`. Use 64-bit arithmetic for the answer. Notes An activity value exactly equal to `D` is reclaimable. Email addresses contain no spaces.

More Zluri OA questionsInterview experiences