{"problem":{"name":"Kth Takoyaki Set","description":{"content":"In AtCoder Kingdom, $N$ kinds of _takoyaki_s (ball-shaped Japanese food) are sold. A takoyaki of the $i$\\-th kind is sold for $A_i$ yen. Takahashi will buy at least one takoyaki in total. He is allowe","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc297_e"},"statements":[{"statement_type":"Markdown","content":"In AtCoder Kingdom, $N$ kinds of _takoyaki_s (ball-shaped Japanese food) are sold. A takoyaki of the $i$\\-th kind is sold for $A_i$ yen.\nTakahashi will buy at least one takoyaki in total. He is allowed to buy multiple takoyakis of the same kind.\nFind the $K$\\-th lowest price that Takahashi may pay. Here, if there are multiple sets of takoyakis that cost the same price, the price is counted only once.\n\n## Constraints\n\n*   $1 \\le N \\le 10$\n*   $1 \\le K \\le 2 \\times 10^5$\n*   $1 \\le A_i \\le 10^9$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $K$\n$A_1$ $A_2$ $\\dots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc297_e","tags":[],"sample_group":[["4 6\n20 25 30 100","50\n\nThe four kinds of takoyakis sold in AtCoder Kingdom cost $20$ yen, $25$ yen, $30$ yen, and $100$ yen.\nThe six lowest prices that Takahashi may pay are $20$ yen, $25$ yen, $30$ yen, $40$ yen, $45$ yen, and $50$ yen. Thus, the answer is $50$.\nNote that at least one takoyaki must be bought."],["2 10\n2 1","10\n\nNote that a price is not counted more than once even if there are multiple sets of takoyakis costing that price."],["10 200000\n955277671 764071525 871653439 819642859 703677532 515827892 127889502 881462887 330802980 503797872","5705443819"]],"created_at":"2026-03-03 11:01:14"}}