My issue
my answer is correct but it,s showing wrong answer
My code
t = int(input())
for _ in range(t):
N, X, P = map(int, input().split())
if(X==0):
print("FAIL")
elif(3 * X -P>= P):
print("PASS")
else:
print("FAIL")
Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef
@p_20ec143
can u plzz copy paste or take screen shots of the problem and send it here .
cozz i’m not able to open the problem due to college restriction.
t = int(input())
for _ in range(t):
N, X, P = map(int, input().split())
if(X==0):
print(“FAIL”)
elif(3 * X -P>= P):
print("PASS")
else:
print("FAIL")
@p_20ec143
i mean problem statement not the code.
The test has a total of �N questions and Chef will necessarily attempt all questions
- Each question carries 33 marks for a correct answer
- and −1−1 for an incorrect answer.
It is known that Chef got �X questions correct and the rest of them incorrect.
For Chef to pass the course he must score at least �P marks.
Will Chef be able to pass the exam or not?
Input Format
- First line will contain �T, number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, three integers �,�,�N,X,P.
Output Format
For each test case output "PASS" if Chef passes the exam and "FAIL" if Chef fails the exam.
Sample 1:
Input
Output
3 5 2 3 5 2 4 4 0 0
PASS FAIL FAIL
Explanation:
Test case 11: Chef gets 22 questions correct giving him 66 marks and since he got 33 questions incorrect so he faces a penalty of −3−3. So Chef’s final score is 33 and the passing marks are also 33, so he passes the exam 
Test case 22: Chef’s total marks are 33 and since the passing marks are 44, Chef fails the test 
Test case 33: Chef got all the problems wrong and thus his total score is −4−4. Since the passing marks are 00, Chef fails the exam 
@p_20ec143
this would be the correct condition
if ((3*X - (N-X))>=P):
print("PASS")
else:
print("FAIL")
thank you…I am getting my output wrong for this code also
for t in range(int(input())):
n, m = map(int, input().split())
if n % 2 != 0 and m % 2 != 0:
print(n + m - 1)
elif n % 2 != 0 and m % 2 == 0:
print(m)
elif n % 2 == 0 and m % 2 != 0:
print(n)
condition is ((3*X - (N-X))>=P) buddy…