Help me in solving MANAPTS problem

My issue

My code

# cook your dish here
t = int(input())
for i in range(t):
    X, Y = map(int,input().split())
    if X <= Y:
        attacks = X // Y
    elif X > Y:

Problem Link: MANAPTS Problem - CodeChef


In the given problem, we have, Y denoting total mana and X denoting cost of one attack. Total number of attacks possible can be calculated using simple division. We can either use a floor division, (Y//X), or integer value of normal division, (int(Y/X)).

The code below can help you understand the solution.

# cook your dish here
for _ in range(int(input())):
1 Like

Thanks a lot :slight_smile: