I’m fairly new to python and recently started solving Kattis problems to practice.
Somehow, I managed to pass 7/19 of the test cases of this problem and I can’t figure out why I can’t pass 19/19 of the test cases. Can someone help?
This is my code:
import math
def price(n):
base=math.ceil(n/100)
nine=base*100-1
return nine
if name == “main“:
import sys
n = int(sys.stdin.readline().strip())
print(price(n))
Ann Aregliden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.