Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cho = input("");
- num = [int(s) for s in cho.split()];
- out = [0, 0, 0];
- out[0] = -24 * num[0] + 6 * num[1] + 12 * num[2];
- out[1] = -6 * num[1] + 12 * num[2];
- out[2] = 4 * num[0] + num[1] - 2 * num[2];
- canary = True;
- for n in out:
- if n % 24 != 0 or n < 0:
- canary = False;
- if canary:
- print("{:d} {:d} {:d}".format(int(out[0]/24),int(out[1]/24),int(out[2]/24)));
- else:
- print("Error");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement