Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python2.7
- def main():
- total = 0;
- with open("day1.txt", 'r') as f:
- lines = f.readlines()
- for x in lines:
- values = int(x)
- while values / 3 - 2 >= 0:
- new_values = ((values / 3) - 2)
- values = new_values
- total += values
- print(total)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement