+ 1
Code problem
Wrong outputs My code: https://code.sololearn.com/cWO526eOTjwR/?ref=app Problem: https://www.sololearn.com/coach/18?ref=app
6 ответов
+ 1
Your condition is not true..
Let me tell you the way
1. The first you separate the tome<agents because the output must be 20
2. Second you separate that the tome hasn't a value of n*agents because its mean tome/agent will be value.mantisa, cause the mantisa is always go up so we add one for the result of division.
here the sub code :
if tome > agents:
if tome%agents == 0:
print(20*(tome//agents))
else :
print(20*(tome//agents + 1))
else:
print(20)
0
I am bit confused about your logic!!!!
I am just posting out a valid test case which fails for your code :-
X
5
A B C D
This should return 20 but your code is returning 100
0
Muhammad, still doesn't work
0
I have tried and sucessfull, you must delete if conditon and replace with i have comented, becarefull in indentation.
0
Yes, now it works, thx
0
Ur welcome