Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- inp = open ("division.in")
- outp = open ("division.out", "w")
- a, b = map(int, inp.readline().split( ))
- if b == 0 :
- print("Na nol' delit' nel'zya!!!", file = outp)
- else:
- c=a/b
- d=-c
- if (a>0) and (b<0):
- print (int(c), file = outp)
- else:
- if (a<0) and (b>0):
- print (-math.ceil(d), file = outp)
- else:
- if (a<0) and (b<0):
- print (math.ceil(c), file = outp)
- else:
- print (int(c), file = outp)
- inp.close ()
- outp.close ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement