Presents for Cheffina CodeChef Solution | CodeChef Problem Solution 2022
Chef has fallen in love with Cheffina, and wants to buy gifts for her. On reaching the gift shop, Chef got to know the following two things:
- The cost of each gift is coin.
- On the purchase of every gift, Chef gets the gift free of cost.
What is the minimum number of coins that Chef will require in order to come out of the shop carrying gifts?
Input Format
- The first line of input will contain an integer — the number of test cases. The description of test cases follows.
- The first and only line of each test case contains an integer , the number of gifts in the shop.
Output Format
For each test case, output on a new line the minimum number of coins that Chef will require to obtain all gifts.
Constraints
Sample Input 1
2
5
4
Sample Output 1
4
4
Explanation
Test case : After purchasing gifts, Chef will get the gift free of cost. Hence Chef only requires coins in order to get gifts.
Chef and Chapters CodeChef Solution | CodeChef Problem Solution 2022
Presents for Cheffina CodeChef Solution | CodeChef Problem Solution 2022
Chef and Bird farm CodeChef Solution | CodeChef Problem Solution 2022
Valentine Vex CodeChef Solution | CodeChef Problem Solution 2022
Buying Sweets CodeChef Solution | CodeChef Problem Solution 2022
Reduce to 1 CodeChef Solution | CodeChef Problem Solution 2022
Three Arrays CodeChef Solution | CodeChef Problem Solution 2022
Test case : Chef will require coins in order to get gifts.
Join Now for Solution:-
No comments:
Post a Comment