5166: B3682 [语言月赛202211] Jewellery(入门)
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description

Input

Output

Sample Input Copy
5 10
Legendary 1
Epic 2
Rare 3
Uncommon 4
Common 5
Common
Uncommon
Common
Common
Uncommon
Legendary
Uncommon
Common
Uncommon
Rare
Sample Output Copy
126
HINT
