Skip to content

Instantly share code, notes, and snippets.

@stefaang
Created September 1, 2015 22:10
Show Gist options
  • Save stefaang/69685898f1b9dc48892c to your computer and use it in GitHub Desktop.
Save stefaang/69685898f1b9dc48892c to your computer and use it in GitHub Desktop.
from math import ceil
import roman # pip install roman
N = 12500e3
jaar = 1
while N > 0:
n = roman.toRoman(jaar)
N = N-len(n)*250
if jaar % 43 == 0:
N = ceil(N * .85)
print "Jaar %d %s: %d steentjes gebruikt, %d over"%(jaar,n,250*len(n),N)
jaar += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment