24th Feb 2020, 3:33 PM
PHOBOS
PHOBOS - avatar
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)
24th Feb 2020, 4:40 PM
Tegar
Tegar - avatar
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
24th Feb 2020, 4:24 PM
Shubham Sharma
Shubham Sharma - avatar
0
Muhammad, still doesn't work
24th Feb 2020, 5:32 PM
PHOBOS
PHOBOS - avatar
0
I have tried and sucessfull, you must delete if conditon and replace with i have comented, becarefull in indentation.
24th Feb 2020, 5:37 PM
Tegar
Tegar - avatar
0
Yes, now it works, thx
24th Feb 2020, 5:38 PM
PHOBOS
PHOBOS - avatar
0
Ur welcome
24th Feb 2020, 5:39 PM
Tegar
Tegar - avatar