-->
当前位置:首页 > 题库

PROGRAMMING:Airline VIP customer inquiry

Luz5年前 (2021-05-10)题库360
Many airlines will provide preferential membership services. When a customer's mileage accumulation reaches a certain amount, they can use mileage points to exchange reward tickets or upgrade directly. The flight record of all members of an airline is given, and the function of quickly querying mileage integral of membership according to the ID number is required.
###Input format:
Input first gives two positive integers, $$n $$($$Le 10 ^ 5 $$) and $$k $$($$Le 500 $$). Among them, $$k $$is the lowest mileage, that is, in order to take care of members who take short-distance flights, airlines will also accumulate flights with a distance less than $$k $$km according to $$k $$km. Next, $$n $$lines, each line gives a flight record. The input format of flight records is `18 bit ID number (space) flight mileage. The ID number is composed of 17 digit plus last bit check code, and the value of the check code ranges from 0~9 and X to 11 symbols. The unit of flight mileage is km, which is an integer in the range of (0,15 000). Then a positive integer $$M$$($$\le 10^5$$) is given, followed by the $$M$$line query ID number.
###Output format:
For each inquirer, the current mileage cumulative value is given. If the person is not a member, output 'no info'. Each query result occupies one row.
###Input example:
```in
4 500
330106199010080419 499
110108198403100012 15000
120104195510156021 800
330106199010080419 1
four
one hundred and twenty thousand one hundred and four trillion and one hundred and ninety-five billion five hundred and ten million one hundred and fifty-six thousand and twenty-one
one hundred and ten thousand one hundred and eight trillion and one hundred and ninety-eight billion four hundred and three million one hundred thousand and twelve
three hundred and thirty thousand one hundred and six trillion and one hundred and ninety-nine billion ten million eighty thousand four hundred and nineteen
33010619901008041x
```
###Output example:
```out
eight hundred
fifteen thousand
one thousand
No Info
```






answer:If there is no answer, please comment